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.
-
Refactored Code Structure:
- Introduced a modular folder structure for better organization and maintainability:
src/validator_regex_pattern.dart
: Moved all regex patterns (email, phone, date, etc.) into a dedicated filevalidator_regex_pattern.dart
.src/validation_builder.dart
: Moved theValidationBuilder
class into a separate filevalidation_builder.dart
for easier usage and customization.src/validators.dart
: Core validation logic is now housed invalidators.dart
, utilizing regex patterns fromValidatorRegexPattern
.
- Introduced a modular folder structure for better organization and maintainability:
-
Improved Validation Logic:
- Centralized all regex patterns in the
ValidatorRegexPattern
class to improve code reusability and maintainability. - Refactored the
ValidationBuilder
class to enable easier chaining of validators and better error message handling.
- Centralized all regex patterns in the
-
Code Refactoring:
- Refactored the validation logic to reference regex patterns from the
ValidatorRegexPattern
class, moving away from hardcoding them directly in theValidators
class. - Reorganized the codebase by relocating the validation builder to the
builder
folder and the core validation logic to thevalidator
folder for clearer structure.
- Refactored the validation logic to reference regex patterns from the
-
Updated Validation Flow:
- The
ValidationBuilder
class now supports easier chaining of validation methods, such asminLength
,maxLength
,email
, andphone
, for more flexible and efficient validation compositions.
- The
- N/A (No specific bug fixes in this release)
- The new modular folder structure may break backward compatibility. You will need to update your imports to match the new file paths:
import 'package:validator_forge/src/validator_regex_pattern.dart';
for regex patterns.import 'package:validator_forge/src/validation_builder.dart';
forValidationBuilder
.import 'package:validator_forge/src/validators.dart';
for core validators.
-
Initial release of Validator Forge package.
-
Implemented core validators for:
- Required fields (
Validators.required
) - Email format validation (
Validators.email
) - Phone number validation (10 digits) (
Validators.phone
) - URL validation (
Validators.url
) - Custom regex pattern matching (
Validators.matchRegex
) - Password length validation (minimum 8 characters) (
Validators.password
) - Minimum length validation (
Validators.minLength
) - Maximum length validation (
Validators.maxLength
) - Numeric validation (
Validators.number
) - Date format validation (
Validators.date
) - Minimum numeric value validation (
Validators.minimum
) - Maximum numeric value validation (
Validators.maximum
) - Field matching (
Validators.match
)
- Required fields (
-
Added
ValidatorRegexPattern
class for common regex patterns (email, URL, signed decimal). -
Introduced
validatorBuilder
function to compose multiple validators.
- N/A (Initial release)
- N/A (Initial release)