isValid method
Check current text is valid to parse or not
Implementation
@override
bool isValid(String text) {
if (text.isEmpty) {
return true;
} else {
try {
numberFormat.parse(text);
return true;
} on FormatException {
return false;
}
}
}