validate method
Validates the provided data against this rule.
Returns true if the data is valid, false otherwise.
Subclasses must implement this method.
Implementation
@override
bool validate(data) {
RegExp regExp = RegExp(
r'^(((\+44\s?\d{4}|\(?0\d{4}\)?)\s?\d{3}\s?\d{3})|((\+44\s?\d{3}|\(?0\d{3}\)?)\s?\d{3}\s?\d{4})|((\+44\s?\d{2}|\(?0\d{2}\)?)\s?\d{4}\s?\d{4}))(\s?\#(\d{4}|\d{3}))?$',
);
return regExp.hasMatch(data.toString());
}