philiprehberger_form_validator 0.4.0 copy "philiprehberger_form_validator: ^0.4.0" to clipboard
philiprehberger_form_validator: ^0.4.0 copied to clipboard

Declarative form validation with composable rules and JSON schemas

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased] #

0.4.0 - 2026-04-02 #

Added #

  • Rules.date() validator for date string validation
  • Rules.dateAfter() and Rules.dateBefore() for date range validation
  • Rules.minItems() and Rules.maxItems() for collection size validation
  • FormSchema.fromJson() now supports date, dateAfter, dateBefore, minItems, and maxItems descriptors

0.3.0 - 2026-04-02 #

Added #

  • MessageProvider for localizable error messages
  • DefaultMessageProvider with English defaults
  • Rules.inRange() for inclusive range validation
  • FormSchema.nested() for validating nested objects
  • FormSchema.validateNested() returns dot-path error keys
  • ValidationResult.nested() extracts errors for a nested prefix

0.2.0 - 2026-04-01 #

Added #

  • AsyncFieldValidator class for asynchronous validation (e.g. server-side checks)
  • FormSchema.validateAsync method supporting both sync and async validators
  • Rules.when for conditional validation based on form data
  • Rules.all composite validator requiring all rules to pass
  • Rules.any composite validator requiring any rule to pass

0.1.0 - 2026-04-01 #

Added #

  • Initial release
  • FieldValidator class for single-field validation rules
  • Rules class with built-in composable validators: required, email, url, minLength, maxLength, pattern, numeric, between, equals, oneOf, custom
  • FormSchema for defining multi-field validation schemas
  • FormSchema.fromJson for JSON-based schema definitions
  • ValidationResult with isValid, hasError, errorsFor, allErrors, errorCount
  • Cross-field validation support via Rules.equals
  • Zero dependencies, pure Dart
2
likes
160
points
179
downloads

Documentation

API reference

Publisher

verified publisherphiliprehberger.com

Weekly Downloads

Declarative form validation with composable rules and JSON schemas

Homepage
Repository (GitHub)
View/report issues

Topics

#validation #form #schema

License

MIT (license)

More

Packages that depend on philiprehberger_form_validator