Class VinConverter
- Namespace
- NuvTools.AspNetCore.Blazor.MudBlazor.Converters
- Assembly
- NuvTools.AspNetCore.Blazor.MudBlazor.dll
Converter for Vehicle Identification Numbers (VIN).
public sealed class VinConverter : DeferredConverter<string?, string?>, IReversibleConverter<string?, string?>, IConverter<string?, string?>
- Inheritance
-
VinConverter
- Implements
- Inherited Members
-
DeferredConverter<string, string>.Convert(string)DeferredConverter<string, string>.ConvertBack(string)
Remarks
VINs do not use the letters I, O, and Q to avoid confusion with the numbers 1, 0, and 9 respectively. This converter automatically removes these invalid characters and converts the input to uppercase.
Constructors
VinConverter()
Initializes a new instance of the VinConverter class.
public VinConverter()
Methods
FormatVin(string?)
Formats a VIN by removing invalid characters and converting to uppercase.
public static string? FormatVin(string? value)
Parameters
valuestringThe VIN value to format.
Returns
- string
The formatted VIN, or the original value if null or empty.