Download the PHP package xtompie/validation without Composer
On this page you can find all versions of the php package xtompie/validation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xtompie/validation
More information about xtompie/validation
Files in xtompie/validation
Package validation
Short Description Validation component
License MIT
Informations about the package validation
Validation
Validation component to validate models, input data. Handle any data types - arrays, objects, scalars, getter methods. Easy to extend. Type hinting / autocompletion. Fluent syntax.
$result
is Xtompie\Result\Result
Requiments
PHP >= 8.0
Installation
Using composer
Docs
Subject
Validation subject can be provided by
Groups
If an error occurs during group validation, subsequent groups will not be validated and validation will stop.
Targets
Nested Target
Targets can be nested e.g.
After nested() function targets are related to last target.
Nested can be reset by unested()
, group()
or main()
target.
Nested can be composed in multiple levels downwards
Space in error is automaticly generated.
Filters
Filters are applied before validators
Required/Optional
Targets are optional by default. If target is required use required method.
Validators
All list validator in source
Scalars
If no target is provided, then the main target, validation subject, will be used.
Validation feedback
Extending
Component consists of 3 elements.
- ValidationValidator - builder and validator.
- ValidationCore - wrapper for the ValidationValidator. Gives fluent syntax, deals with validation subject.
- Validation - extends ValidationCore by inheritance. Gives concrete validations, filters, messages, keys.
Inheritance
Validation or ValidationCore can be extended by inheritance.