Skip to content
pubscout

zod_validation

1.0.5, released 3 years ago by an unverified publisher

Data validation library for Flutter forms and Shelf backend requests.

WASM-ready
$ flutter pub add zod_validation
Source repository

What it does

Provides a fluent API to validate strings, emails, passwords, documents like CPF/CNPJ, and nested maps. It can be used directly with Flutter's TextFormField validators or for validating JSON payloads in Shelf backend servers.

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

Use it when

  • You need a fluent, chainable validation syntax for form fields in Flutter.
  • You want to validate incoming JSON payloads on a Shelf-based Dart backend.

Skip it when

  • You need complex form state management beyond simple input validation.

Strengths

  • Supports both frontend Flutter widgets and backend Shelf routes.
  • Customizable localization for validation error messages.
  • Includes various built-in validations such as email, password, min/max length, and CPF/CNPJ.

Weaknesses

  • Limited documentation on all available custom validation rules.
  • No pre-existing alternatives in the catalog that cover both full schema and form validation simultaneously.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0

not documented

TextFormField(
  validator: Zod().required().min(3).email().build,
)

Alternatives

Packages that do the same job and could replace zod_validation.

  • world_countries

    Compile-time sealed world data with country, currency, language, and phone pickers.

  • drop_down_list

    A customizable dropdown widget supporting single/multiple selection and integrated search.

  • fzregex

    A regex validation library for common user input, identifiers, media formats, and financial data.

  • email_validator

    A simple Dart class for validating email addresses without using RegEx.