discontinuedPackage callor has been discontinued and replaced by formdator.

callor library

Callor - Callable Validator. According to the Flutter form standards, a validator must return the null value to indicate that an input is valid. On the other hand, to indicate a valid input, a validator must return a message, which in turn will be displayed to the user by the field with wrong data.

Classes

Cnpj
CNPJ - Cadastro Nacional de Pessoa Jurídica.
CnpjStrip
CNPJ plain value - non-numeric characters stripped from it.
Counter
Counts the number of times the validation has been performed.
Cpf
CPF - Cadastro da Pessoa Física.
CpfStrip
CPF plain value - non-numeric characters stripped from it.
Digit
Digit - any one of the ten numbers 0 to 9.
Email
Optional well-formed email.
Equal
Equality rule - checks whether A == B.
MaxLen
Validates an optional not too long String value.
MinLen
Validates an optional not too short String value.
Nok
Always invalid
Ok
Always valid - Tautology.
Req
Mandatory field.
Rules<T>
Multiple rules applied to a field.
Trim
Trimmed value.
ValueBack
Unit testing purposes - it gives back the input value as String.

Typedefs

DTVal<DT extends DateTime> = String? Function(DT?)
DateTime value validator ≡ DateTime? Function(DateTime? value).
IterVal<I extends Iterable> = String? Function(I?)
Iterable value validator ≡ Iterable? Function(Iterable? value).
MapVal<M extends Map> = String? Function(M?)
Map value validator ≡ Map? Function(Map? value).
NumVal<N extends num> = String? Function(N?)
Numeric value validator ≡ num? Function(num? value).
ObjVal<O extends Object> = String? Function(O?)
Object value validator ≡ Object? Function(Object? value).
StrVal<S extends String> = String? Function(S?)
String value validator ≡ String? Function(String? value).
TypeVal<T> = String? Function(T?)
Type value validator ّ≡ T? Function(T? value).