tryValidate method

  1. @override
String? tryValidate()
override

Validates the form field value

Implementation

@override
String? tryValidate() {
  final parsedValue = double.tryParse(value);
  if (parsedValue == null) {
    if (customMessage == null) {
      return buildMessage(ValidatorStrings.double, attribute);
    }
    return customMessage;
  }
  return null;
}