validate property

FormValidatorCallback? validate
final

Closure-based validator. Receives a fresh FormValidator and the current field value; register rules via validate.that(data, attribute).<rule>().

Mutually exclusive with formValidator — set one or the other.

InputField(
  controller: _controller,
  labelText: "Username",
  validate: (validate, data) {
    validate.that(data, "Username").minLength(3);
  },
)

Implementation

final FormValidatorCallback? validate;