number method

FormFieldValidator<String> number (
  1. {bool noSymbols: true,
  2. String message}
)

Implementation

static FormFieldValidator<String> number(
    {bool noSymbols = true, String message}) {
  return (fieldValue) {
    if (Validator.isNumber(fieldValue, allowSymbols: noSymbols)) {
      return null;
    } else {
      return message ?? "Field must be numbers only";
    }
  };
}