Skip to content
pubscout

validatorless

1.3.2, released 3 months ago by despezzas.com.br

Provides a means to validate text inputs on Flutter inspired by Yup.

WASM-ready
$ flutter pub add validatorless
Source repository

What it does

Provides a collection of chainable validation functions for Flutter text inputs, such as email, required fields, CPF, CNPJ, and regular expressions. It allows combining multiple rules easily inside form fields.

AI-written summary of version 1.3.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to validate form fields in Flutter quickly with built-in validators
  • You want to combine multiple validation rules like required and email cleanly

Skip it when

  • You need complex cross-field validation not supported by the built-in compare functions

Strengths

  • Includes many pre-built validators like email, CPF, CNPJ, phone, CEP, and credit card
  • Easy to chain multiple validation rules using Validatorless.multiple

Weaknesses

  • Limited to string validation for text inputs
  • Localization of error messages is not documented

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
TextFormField(
  decoration: InputDecoration(
    labelText: 'User e-mail',
  ),
  validator: Validatorless.multiple([
     Validatorless.email('The field must be an email'),
     Validatorless.required('The field is obligatory')
  ]),
)

Alternatives

Packages that do the same job and could replace validatorless.