Class to wrap a library of validators. Provided this way as a convenient way to pass functions by reference to the validation configuration
◆ absolueURI()
static coarnotify\validate\Validators::absolueURI |
( |
| $obj, |
|
|
| $uri ) |
|
static |
Validate that the given string is an absolute URI
- Parameters
-
- Returns
- true
- Exceptions
-
◆ atLeastOneOf()
static coarnotify\validate\Validators::atLeastOneOf |
( |
array | $values | ) |
|
|
static |
Closure that returns a validation function that checks that a list of values contains at least one of the given values
- Parameters
-
- Returns
- \Closure
◆ contains()
static coarnotify\validate\Validators::contains |
( |
| $value | ) |
|
|
static |
Closure that returns a validation function that checks the provided values contain the required value
- Parameters
-
- Returns
- \Closure
◆ oneOf()
static coarnotify\validate\Validators::oneOf |
( |
array | $values | ) |
|
|
static |
Closure that returns a validation function that checks that the value is one of the given values
- Parameters
-
- Returns
- \Closure
◆ typeChecker()
static coarnotify\validate\Validators::typeChecker |
( |
| $obj, |
|
|
| $value ) |
|
static |
Validate that the given value is of the correct type for the object. The exact behaviour of this function depends on the object provided:
- If the object has an
ALLOWED_TYPES
attribute which is not an empty list, then the value must be one of the types in that list
- If the object has a
TYPE
attribute, then the value must be, or contain, that type
- In all other cases, type validation will succeed
- Parameters
-
- Returns
- true
◆ url()
static coarnotify\validate\Validators::url |
( |
| $obj, |
|
|
| $url ) |
|
static |
Validate that the given string is an absolute HTTP URI (i.e. a URL)
- Parameters
-
- Returns
- true
- Exceptions
-
The documentation for this class was generated from the following file:
- src/validate/Validators.php