validate method

String? validate(
  1. String? text
)

Implementation

String? validate(String? text) => switch (this) {
      notEmpty =>
        (text?.isEmpty ?? true) ? 'Do no forget to fill in this field' : null,
      email => _email(text),
      password => _password(text),
      passwordComplex => _passwordComplex(text),
      digitsOnly => _digitsOnly(text),
      none => null,
    };