Skip to content
pubscout

ez_validator

1.0.1, released 4 months ago by iheb.tech

Dead‑simple field and object schema validation for Flutter.

WASM-ready
$ flutter pub add ez_validator
Source repository

What it does

Define validation schemas with EzValidator and validate data objects. It returns a map of field errors or processed data synchronously. Supports custom and conditional rules.

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

Use it when

  • validating form inputs in Flutter widgets
  • defining reusable data schemas for API responses
  • adding custom validation logic without code generation

Skip it when

  • need asynchronous or server‑side validation
  • requiring extensive code‑gen or annotation‑based models
  • high‑performance validation of massive data sets

Strengths

  • very easy to integrate and use
  • supports conditional, custom, and nested validation
  • works on all Flutter platforms

Weaknesses

  • no async validation support
  • limited to synchronous checks
  • small ecosystem compared to larger validation libraries

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
final userSchema = EzSchema.shape({"email": EzValidator<String>().required().email(),"password": EzValidator<String>().required().minLength(8)});
final errors = userSchema.catchErrors({"email":"test","password":"123"});

Alternatives

Packages that do the same job and could replace ez_validator.