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
150
points
10
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.

Topics

#validation #validators #dart #productivity #form

Documentation

API reference

License

MIT (license)

More

Packages that depend on mayr_validator