validate
Validates an ESIC number.
Input normalization before validation:
Trim leading/trailing whitespace
Strip internal whitespace
After normalization, checks are applied in this order — first failing check wins:
InvalidReason.EMPTY if the result is blank
InvalidReason.WRONG_LENGTH if digit count is not 17
InvalidReason.INVALID_FORMAT if any non-digit character remains
Return
ValidationResult.Valid if the input normalizes to exactly 17 digits, ValidationResult.Invalid with an appropriate InvalidReason otherwise.
Parameters
value
Raw ESIC number string.
Samples
check(ESIC.validate("12345678901234567") == ValidationResult.Valid)Content copied to clipboard