universal_validator 1.0.5
universal_validator: ^1.0.5 copied to clipboard
The ultimate Flutter form validation library. Validators & smart widgets for Email, Phone, Password, Credit Card, UPI, and Indian docs (Aadhaar, PAN, GST, IFSC).
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.5 - 2024-01-16 #
๐ Added #
- New Validators:
VoterIdValidator- Indian Voter ID (EPIC) validation (ABC1234567 format)PincodeValidator- Indian Pincode validation (6 digits)
- SmartTextField Support:
- Added
FieldType.voterIdandFieldType.pincodesupport with automatic validation and formatting
- Added
๐ง Improvements #
- Updated
README.mdwith new validator details - Added tests for new field types
1.0.4 - 2024-01-06 #
๐ Improvements #
- Updated
pubspec.yamldescription with SEO-friendly keywords - Renamed "Features" section in
README.mdto "Why Universal Validator?" - Added comprehensive Supported Validators table in
README.md - Clarified Indian KYC and Finance validator support
- Cleaned up lint warnings by removing deprecated rules from
analysis_options.yaml - Resolved all issues found by
flutter analyze
1.0.3 - 2024-01-06 #
๐ง Improvements #
- Enhanced code quality and documentation coverage
- Improved
ErrorMessageProviderAPI for better usability - Fixed multiple linting warnings and static analysis issues
- Optimized
ValidationEngineperformance with cascade operators - Updated example application and documentation
1.0.2 - 2024-12-30 #
๐ง Fixed #
- Shortened package description to meet pub.dev requirements
- Improved pub points score
1.0.1 - 2024-12-30 #
๐ง Fixed #
- Fixed pub.dev 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
SmartTextField- 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.