DrivingLicenseValidator constructor
DrivingLicenseValidator()
validate the Driving license number.
The valid Indian driving license number must satisfy the following conditions:
- It should be 16 characters long (including space or hyphen (-)).
- The driving license number can be entered in any of the following formats: HR-0619850034761 OR HR06 19850034761
- The first two characters should be upper case alphabets that represent the state code.
- The next two characters should be digits that represent the RTO code.
- The next four characters should be digits that represent the license issued year.
- The next seven characters should be any digits from 0-9.
Implementation
factory DrivingLicenseValidator() {
_instance ??= DrivingLicenseValidator._();
return _instance!;
}