formdator library Null safety

FormdatorFormidable Validator.

According to Flutter's form rules, a validator must return null to indicate valid data, or a message — which will be displayed to the user by the field with erroneous data — to indicate invalid data.

Classes

BrMobile
Plano Brasileiro de Numeração Móvel. [...]
BrMobileStrip
BrMobile as a digit-only value. [...]
BrPhone
Plano Brasileiro de Numeração de Telefones Fixos. [...]
BrPhoneStrip
BrPhone as a digit-only value. [...]
Cep
CEP — Código de Endereçamento Postal. [...]
CepStrip
CEP as a digit-only value. [...]
Cnpj
CNPJ - Cadastro Nacional de Pessoa Jurídica. [...]
CnpjStrip
CNPJ as a digit-only value. [...]
CnpjVal
CNPJ Validity — it checks the validity of the provided CNPJ.
Counter
Counts the number of times the validation has been performed.
Cpf
CPF - Cadastro da Pessoa Física. [...]
CpfStrip
CPF as a digit-only value. [...]
CpfVal
CPF Validity — it checks the validity of the provided CPF.
Digit
Digit - any one of the ten numbers 0 to 9. [...]
Email
Validator of optional e-mail values. [...]
Equal
Equality rule — checks whether A == B.
Hex
Hex - any one of the sixteen hexadecimal digits 0 to F. [...]
Int
Integer constraints — limits input data to integer values. [...]
Len
Length-related constraints. [...]
Match
Constrains input data values to a certain text pattern.
Nok
Always invalid [...]
Num
Numeric constraints — limits input data to numeric values. [...]
Ok
Always valid - Tautology. [...]
Pair
A pair of validators.
Req
Validator for mandatory input data. [...]
ReqBrMobile
Plano Brasileiro de Numeração Móvel Para Campos Obrigatórios. [...]
ReqBrPhone
Plano Brasileiro de Numeração de Telefones Fixos Para Campos Obrigatório. [...]
ReqCep
Required CEP — Código de Endereçamento Postal. [...]
ReqCnpj
Required CNPJ - Cadastro Nacional de Pessoa Jurídica. [...]
ReqCpf
Required CPF - Cadastro da Pessoa Física. [...]
ReqDigit
Convenient validator for required, digit-only fields. [...]
ReqEmail
Convenient validator for required email fields. [...]
ReqHex
Convenient validator for required hexadecimal fields.
ReqInt
Convenient validator for required, integer fields. [...]
ReqLen
Convenient validator for required fields with length (number of items) constraints. [...]
ReqMatch
Convenient validator for required fields whose constraints regard to text pattern.
ReqNum
Convenient validator for required, numeric fields. [...]
Rules<T>
Multiple rules applied to input data.
ToValObj
Transforms an input value of type 'Object?' into a more suitable type.
Trim
Trims input data. [...]
ValueBack
Unit testing purposes - it gives back the input value as String.

Typedefs

ValDT = String? Function(DateTime? dt)
Validator for DateTime input data. [...]
ValIter = String? Function(Iterable? i)
Validator for Iterable input data. [...]
ValMap = String? Function(Map? m)
Validator for Map input data. [...]
ValNum = String? Function(num? n)
Validator for num input data. [...]
ValObj = String? Function(Object? o)
Validator for non-specific input data. [...]
ValStr = String? Function(String? s)
Validator for String input data. [...]
ValType<T> = String? Function(T? t)
Set of validator types. Generic validator. [...]