PassportValidator constructor
PassportValidator()
validate the passport number.
The valid passport number of India must satisfy the following conditions:
- It should be eight characters long.
- The first character should be an upper case alphabet except Q, X, and Z.
- The next two characters should be a number, but the first character should be any number from 1-9 and the second character should be any number from 0-9.
- The next four characters should be any number from 0-9.
- The last character should be any number from 1-9.
see https://www.geeksforgeeks.org/how-to-validate-indian-passport-number-using-regular-expression/
Implementation
factory PassportValidator() {
_instance ??= PassportValidator._();
return _instance!;
}