Download the PHP package attributes-php/validation without Composer
On this page you can find all versions of the php package attributes-php/validation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download attributes-php/validation
More information about attributes-php/validation
Files in attributes-php/validation
Download attributes-php/validation
More information about attributes-php/validation
Files in attributes-php/validation
Vendor attributes-php
Package validation
Short Description The PHP Pydantic validation library which supports data validation via type-hinting
License MIT
Package validation
Short Description The PHP Pydantic validation library which supports data validation via type-hinting
License MIT
Please rate this library. Is it a good library?
Informations about the package validation
Attributes Validation
Attributes Validation is a Pydantic-inspired PHP library for validating data via type hints. Your model types are the schema: no configuration files, no YAML.
Features
- Validates data via type-hinting and hydrates raw arrays into models
- Strict by default, with opt-in loose scalar coercion via
#[ModelConfigs(strict: false)] - Nested models hydrate recursively, with dot-notation error paths (
users.0.email) - Typed
arrayproperties declare their element shape with theSequence,Union,IntersectionandDictattributes Aliasattribute andModelConfigsalias generators map input keys to properties- Custom error messages per field with the
ErrorMessageattribute beforeValidation/afterValidationhooks on the modelcall()invokes any callable with hydrated models and injected dependencies
Requirements
- PHP 8.2 or later
Installation
Usage
Validation failures throw Attributes\Validation\Exceptions\ValidationException with the error list keyed by field path:
Attributes Validation was created by André Gil and is open-sourced software licensed under the MIT license.
All versions of validation with dependencies
PHP Build Version
Package Version
The package attributes-php/validation contains the following files
Loading the files please wait ...