form_shield 0.1.0
form_shield: ^0.1.0 copied to clipboard
A declarative, rule-based form validation library for Flutter apps.
Changelog #
All notable changes to the Form Shield package will be documented in this file.
The format is based on Keep a changelog, and this project adheres to Semantic versioning.
0.1.0 - 2025-04-03 #
Added #
- Initial release of Form Shield
- Core validation framework with
ValidationRuleabstract class andValidationResultclass Validatorclass with support for chaining multiple validation rules- Type-specific validator factory methods:
forString(),forNumber(),forBoolean(), andforDate() - Built-in validation rules:
RequiredRule- Validates that a value is not null or emptyEmailRule- Validates email addresses with customizable regex patternPasswordRule- Validates passwords with configurable complexity requirementsPasswordMatchRule- Validates that passwords matchLengthRule- Validates string length with min and max constraintsMinLengthRule- Validates minimum string lengthMaxLengthRule- Validates maximum string lengthValueRule- Validates numeric values with min and max constraintsMinValueRule- Validates minimum numeric valueMaxValueRule- Validates maximum numeric valuePhoneRule- Validates phone numbersCountryPhoneRule- Validates phone numbers for specific countriesCustomRule- Allows custom validation logic with fixed error messageDynamicCustomRule- Allows custom validation logic with dynamic error messages
- Seamless integration with Flutter's form validation system
- Example login form implementation