validate

Validates an Indian vehicle registration number (RC).

Input normalisation applied before validation (in order):

  1. Trim leading/trailing whitespace

  2. Strip all internal whitespace (covers space-separated plate forms)

  3. Strip all hyphens (covers hyphen-separated plate forms common in printed documents)

  4. Uppercase all characters

After normalisation, checks are applied in order — first failing check wins:

Never throws. Returns ValidationResult.Invalid for all invalid inputs.

Return

ValidationResult.Valid if the registration is valid, ValidationResult.Invalid with an appropriate InvalidReason otherwise.

Parameters

value

Raw vehicle registration string in any common input form.

Samples

check(VehicleRC.validate("MH01AB1234") == ValidationResult.Valid)