Oihana PHP

Oihana PHP Validation

Composable validation rules and helpers for PHP 8.4+, built on Somnambulist Validation.

πŸ“š Documentation

Narrative user guides (FR + EN), with examples:

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

πŸ”— Related packages

πŸ”— Project on GitHub

View the full source code and contribute on GitHub: github.com/BcommeBois/oihana-php-validation.

Search results