Skip to content
pubscout

form_field_validator

1.1.0, released 6 years ago by codeness.ly

A straightforward Flutter form field validator providing common validation options.

WASM-ready
$ flutter pub add form_field_validator
Source repository

What it does

Provides common validation options and classes for Flutter form fields such as emails, required fields, minimum lengths, patterns, and matching values. Allows combining multiple validation rules and creating custom validators by extending base classes.

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

Use it when

  • You need to validate standard form fields like email, password, or required inputs in Flutter.
  • You want to combine multiple validation rules for a single form field.
  • You need to create custom form field validators easily.

Skip it when

  • You need complex state-managed form building solutions rather than simple validation functions.

Strengths

  • Simple and straightforward usage directly in TextFormField validators.
  • Supports multi-rule validation out of the box.
  • Easy to extend for custom validation logic.

Weaknesses

  • Limited to form field validation options provided or custom subclasses.
  • No advanced form state management features.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1
TextFormField(
  validator: EmailValidator(errorText: 'enter a valid email address'),
);

Alternatives

Packages that do the same job and could replace form_field_validator.

  • formz

    Choose formz for a more robust, model-driven approach to form validation and state management.

  • string_validator

    Choose string_validator if you just need utility functions to validate and sanitize strings without form field bindings.

Works with

Packages commonly used together with form_field_validator: ones it builds on, ones built on it, and its own family.