philiprehberger_form_validator 0.4.0
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 validationRules.dateAfter()andRules.dateBefore()for date range validationRules.minItems()andRules.maxItems()for collection size validationFormSchema.fromJson()now supportsdate,dateAfter,dateBefore,minItems, andmaxItemsdescriptors
0.3.0 - 2026-04-02 #
Added #
MessageProviderfor localizable error messagesDefaultMessageProviderwith English defaultsRules.inRange()for inclusive range validationFormSchema.nested()for validating nested objectsFormSchema.validateNested()returns dot-path error keysValidationResult.nested()extracts errors for a nested prefix
0.2.0 - 2026-04-01 #
Added #
AsyncFieldValidatorclass for asynchronous validation (e.g. server-side checks)FormSchema.validateAsyncmethod supporting both sync and async validatorsRules.whenfor conditional validation based on form dataRules.allcomposite validator requiring all rules to passRules.anycomposite validator requiring any rule to pass
0.1.0 - 2026-04-01 #
Added #
- Initial release
FieldValidatorclass for single-field validation rulesRulesclass with built-in composable validators: required, email, url, minLength, maxLength, pattern, numeric, between, equals, oneOf, customFormSchemafor defining multi-field validation schemasFormSchema.fromJsonfor JSON-based schema definitionsValidationResultwith isValid, hasError, errorsFor, allErrors, errorCount- Cross-field validation support via
Rules.equals - Zero dependencies, pure Dart