Skip to content
pubscout

form_builder_validators

11.3.0, released 10 months ago by flutterformbuilderecosystem.com

A comprehensive collection of ready-made FormField validators for Flutter.

WASM-ready
$ flutter pub add form_builder_validators
Source repository

What it does

Provides standard validation rules (like required, email, numeric, credit card, etc.) for any FormField widget. It allows combining multiple validation rules, transforming values, and localizing error messages into numerous languages.

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

Use it when

  • You need pre-built validators for common input types like email, URLs, numbers, and custom regex.
  • You need to internationalize form error messages into multiple languages.
  • You want to compose or chain multiple validation rules together declaratively.

Skip it when

  • You are using a state-management form library that already has its own robust validation mechanism like formz and prefer keeping validation tied directly to that model.

Strengths

  • Extensive library of pre-built validators covering core, network, numeric, finance, string, and identity use cases.
  • Built-in localization support for dozens of languages.
  • Supports composing, conditional validation, and chaining validators.

Weaknesses

  • Requires maintaining additional dependencies if used for very basic forms where standard Flutter validator callbacks suffice.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2

Requires adding flutter_localizations to your app configuration for localized error messages.

TextFormField(
  decoration: const InputDecoration(labelText: 'Email'),
  validator: FormBuilderValidators.compose([
    FormBuilderValidators.required(),
    FormBuilderValidators.email(),
  ]),
)

Alternatives

Packages that do the same job and could replace form_builder_validators.

  • formz

    Choose formz if you prefer a standalone, immutable input validation approach for BLoC or other state management solutions without relying on Flutter's FormField widgets.

  • string_validator

    Choose string_validator if you only need lightweight string checking functions rather than a full FormField validation suite.

Works with

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