validate method
Implementation
@override
void validate(String? newValue) {
final String? _newValue = newValue;
if (_newValue == null || _newValue.isEmpty) {
if (isRequired) {
throw RequiredValueException();
}else{
return;
}
}
final bool isValid = CPFValidator.isValid(_newValue);
if (isValid == false) {
throw InvalidValueException();
}
}