universal_validator 1.0.3
universal_validator: ^1.0.3 copied to clipboard
Comprehensive form validation for Flutter. Includes validators & widgets for Email, Phone, Password, and Indian documents like PAN, GST, Aadhaar, IFSC, UPI, & Vehicle.
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.
1.0.3 - 2025-12-31 #
π Breaking Changes #
- Renamed
SmartTextFieldtoUTextFieldfor brevity and better naming convention.
β¨ Added #
- Indian Validators
AadhaarValidator: Validation for Indian Aadhaar numbers (with Verhoeff algorithm)IFSCValidator: Validation for Indian Financial System CodesUPIIDValidator: Validation for Unified Payments Interface IDsVehicleNumberValidator: Validation for Indian Vehicle Registration numbers
- Documentation
- Added comprehensive documentation for new Indian validators
- Added usage examples for all new validators
- Updated example app with new fields
1.0.2 - 2024-12-30 #
π§ Fixed #
- Shortened package description to meet pub.flutter-io.cn requirements
- Improved pub points score
1.0.1 - 2024-12-30 #
π§ Fixed #
- Fixed pub.flutter-io.cn publication issues
- Reduced topics to maximum allowed (5)
- Improved package metadata for better discoverability
1.0.0 - 2024-12-30 #
π Initial Release #
Added
-
Core Validators
EmailValidator- RFC-compliant email validation with international domain supportPhoneValidator- International and Indian phone number validationPasswordValidator- Configurable password strength validationNameValidator- Name validation with cultural character set supportPANValidator- Indian PAN card format validation (AAAAA9999A)GSTValidator- Indian GST number validation with checksum verification
-
Smart Widgets
UTextField- Intelligent text field with built-in validation and formatting- Real-time validation with configurable debouncing
- Success indicators and error message display
- Field type-based automatic validation
-
Input Formatters
PhoneFormatter- Phone number formatting with separatorsNameFormatter- Name formatting with proper case handlingPANFormatter- PAN card formatting (uppercase)GSTFormatter- GST number formatting (uppercase)GeneralFormatter- Base formatter for custom implementations
-
Configuration System
FieldConfiguration- Customizable field behaviorValidationRule- Custom validation rule supportPasswordConfig- Configurable password requirementsErrorMessageProvider- Custom error message support
-
Core Architecture
ValidationEngine- Central validation processingValidationResult- Structured validation outcomesValidationContext- Context-aware validationFieldTypeenum - Predefined field types
Features
- β International Support: Phone numbers, email formats, Unicode characters
- β Real-time Validation: Debounced validation with customizable timing
- β Custom Error Messages: Override default messages with custom text
- β Multiple Validation Rules: Chain multiple rules with priority ordering
- β Input Formatting: Automatic formatting as user types
- β Cross-platform: Works on iOS, Android, Web, macOS, Windows, Linux
- β Property-based Testing: Comprehensive test coverage with 100+ test iterations
- β Localization Ready: Support for custom error message providers
Supported Formats
- Email: RFC-compliant with international domain support
- Phone:
- Indian: 10-digit numbers starting with 6-9
- International: +country code format
- US/Canada: +1 followed by 10 digits
- UK: +44 followed by 10-11 digits
- Password: Configurable length, character types, complexity
- PAN: AAAAA9999A format (5 letters, 4 digits, 1 letter)
- GST: 15-character format with checksum validation
- Name: Alphabetic characters, spaces, hyphens, apostrophes
Technical Details
- Minimum Dart SDK: 3.0.0
- Minimum Flutter: 3.0.0
- Dependencies: Only Flutter SDK (no external dependencies)
- Test Coverage: 40+ property-based tests with 100 iterations each
- Architecture: Modular design with clear separation of concerns
π§ Technical Implementation #
- Implemented comprehensive validation engine with context support
- Added property-based testing for robust validation across input variations
- Created modular formatter system for extensible input formatting
- Built smart widget system with automatic field type detection
- Designed flexible configuration system for customization
π Documentation #
- Comprehensive README with examples and usage guides
- API documentation for all public classes and methods
- Property-based test documentation
- Contributing guidelines and development setup
π§ͺ Testing #
- 40+ property-based tests covering all validators
- Edge case testing for boundary conditions
- International format testing
- Custom configuration testing
- Widget integration testing
Future Releases #
Planned Features for v1.1.0 #
- β Additional country-specific validators
- β More input formatters (credit card, date, etc.)
- β Enhanced localization support
- β Accessibility improvements
- β Performance optimizations
Planned Features for v1.2.0 #
- β Form-level validation coordination
- β Validation rule builder UI
- β Advanced password strength indicators
- β Biometric validation integration
- β Cloud-based validation rules
Migration Guide #
This is the initial release, so no migration is needed. For future versions, migration guides will be provided here.
Breaking Changes #
None in this initial release.
Deprecations #
None in this initial release.
Note: This changelog follows the Keep a Changelog format. Each release will document all notable changes including new features, bug fixes, breaking changes, and deprecations.