that method

FormValidator that(
  1. dynamic data, [
  2. String? attribute
])

Configures the validator with the value and attribute to validate, then returns this so rules can be chained.

Designed for use inside the InputField.validate closure:

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

Implementation

FormValidator that(dynamic data, [String? attribute]) {
  setData(data);
  if (attribute != null) {
    setAttribute(attribute);
  }
  return this;
}