handle method
Handle the validation, the info
variable will contain the following:
info'rule'
= Validation rule i.e "min".
info'data'
= Data the user has passed into the validation.
info'message'
= Overriding message to be displayed for validation (optional).
Implementation
@override
bool handle(Map<String, dynamic> info) {
RegExp regExp = RegExp(r'^([a-zA-Z]{1,2}\d{1,2})\s*?(\d[a-zA-Z]{2})$');
super.handle(info);
return regExp.hasMatch(info['data'].toString());
}