validate
Validates a Company Identification Number (CIN).
Input normalisation applied before validation (in order):
Trim leading/trailing whitespace
Strip all internal whitespace (covers copy-paste with spaces)
Uppercase all characters
After normalisation, checks are applied in order — first failing check wins:
InvalidReason.EMPTY if the result is blank
InvalidReason.WRONG_LENGTH if length is not 21
InvalidReason.INVALID_PREFIX if position 0 is not
LorUInvalidReason.INVALID_FORMAT if the string does not match the CIN regex
Return
ValidationResult.Valid if the code is a valid MCA CIN, ValidationResult.Invalid with an appropriate InvalidReason otherwise.
Parameters
value
Raw CIN string in any common input form.
Samples
check(CIN.validate("L17110MH1973PLC019786") == ValidationResult.Valid)Content copied to clipboard