validator method

NikuTextField validator(
  1. FormFieldValidator<String> validator
)

An optional method that validates an input. Returns an error string to display if the input is invalid, or null otherwise.

Equivalent to

TextFormField(
  validator: input
)

Implementation

NikuTextField validator(FormFieldValidator<String> validator) {
  this._validator = validator;

  return this;
}