mayr_validator 1.0.0 copy "mayr_validator: ^1.0.0" to clipboard
mayr_validator: ^1.0.0 copied to clipboard

A powerful yet elegant validation library for Dart and Flutter, inspired by Laravel's validator syntax and philosophy.

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.0 - 2025-10-10 #

Added #

  • πŸŽ‰ Initial release of MayrValidations
  • βœ… Core MayrValidationCore singleton for global configuration
  • βœ… Fluent MayrValidator class for chainable validation
  • βœ… Extension method mayrValidator() on String
  • βœ… Comprehensive validation rules inspired by Laravel:
    • Boolean validators: accepted(), boolean(), declined()
    • String validators: required(), min(), max(), email(), url(), alpha(), alphaNum(), alphaDash(), ascii(), lowercase(), uppercase(), regex(), notRegex(), startsWith(), endsWith(), doesntStartWith(), doesntEndWith(), uuid(), ulid(), ipAddress(), macAddress(), hexColor(), json(), inList(), notIn(), same(), different()
    • Number validators: numeric(), integer(), decimal(), between(), gt(), gte(), lt(), lte(), digits(), digitsBetween(), multipleOf()
    • Array validators: array(), contains(), doesntContain(), distinct()
    • Date validators: date(), after(), afterOrEqual(), before(), beforeOrEqual(), dateEquals()
    • Utility validators: nullable(), requiredIf(), requiredUnless()
  • βœ… Custom rule registration with registerRule()
  • βœ… Validation group registration with registerGroup()
  • βœ… Environment-aware error handling (dev vs prod)
  • βœ… Global configuration for messages and defaults
  • βœ… Message template support with placeholders ({min}, {max}, etc.)
  • βœ… Debounce support for validation execution
  • βœ… Comprehensive test suite with 71+ tests
  • βœ… Pure Dart and Flutter examples
  • βœ… Full documentation with dartdoc comments

Features #

  • 🧩 Fluent API - Chain validation rules like Laravel
  • βš™οΈ Global Configuration - Define global defaults and messages
  • πŸ” Reusable Groups - Register and reuse complex validation patterns
  • 🧱 Custom Validators - Extend with your own validation logic
  • ⚑ Debounce Support - Control when validations run
  • πŸ§β€β™‚οΈ Standalone or Flutter-ready - Works in pure Dart and Flutter
0
likes
160
points
0
downloads

Publisher

verified publishermayrlabs.com

Weekly Downloads

A powerful yet elegant validation library for Dart and Flutter, inspired by Laravel's validator syntax and philosophy.

Repository (GitHub)
View/report issues
Contributing

Topics

#validation #validators #dart #productivity #form

Documentation

Documentation
API reference

License

MIT (license)

More

Packages that depend on mayr_validator