minValue static method

FormFieldValidator<String> minValue({
  1. double? minValue,
  2. String? message,
})

Implementation

static FormFieldValidator<String> minValue(
    {double? minValue, String? message}) {
  return (fieldValue) {
    if (fieldValue!.trim().isEmpty)
      return message ?? "Field must be greater than $maxValue";
    double dFieldValue = double.parse(fieldValue
        .replaceAll(" ", "")
        .replaceAll(",", "")
        .replaceAll(".", ""));
    if (Validator.minValue(dFieldValue, minValue!)) {
      return null;
    } else {
      return message ?? "Field must be greater than $maxValue";
    }
  };
}