Composable validation rules and helpers for PHP 8.4+, built on Somnambulist Validation.
π Documentation
Narrative user guides (FR + EN), with examples:
- π¬π§ English documentation
- π«π· Documentation franΓ§aise
You are currently browsing the auto-generated API reference (phpDocumentor).
π Features
- π’ Comparison & range rules β
EqualRule,GreaterThanRule,LessThanRule,RangeRule. - π
ISO 8601 date, datetime & duration rules β
ISO8601DateRule,ISO8601DateTimeRule,ISO8601DurationRule. - π Geo & i18n rules β
LatitudeRule,LongitudeRule,ElevationRule,I18nRule,PostalCodeRule. - ποΈ Model-aware rules β
ExistModelRule,UniqueModelRule,ConstantsRule. - π§° Expressive rule helpers β
between(),requiredIf(),digitsBetween(), and more. - π§ͺ 100% unit-test line coverage.
π¦ Installation
This library requires PHP 8.4+ and is installed via Composer:
composer require oihana/php-validation
π§Ύ License
This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).
π€ About the Author
- Name: Marc ALCARAZ (aka eKameleon)
- Website: www.ooop.fr
- Email: marc@ooop.fr
π Related packages
- oihana/php-models β document/PDO models used by the model-aware rules.
- oihana/php-standards β ISO standards (ISO 8601, ISO 3166) used by the date and postal rules.
- oihana/php-enums β strongly-typed constant enumerations.
π Project on GitHub
View the full source code and contribute on GitHub: github.com/BcommeBois/oihana-php-validation.