ICollection
extends
IValidator
in
Validation collection.
Table of Contents
Methods
- add() : $this
- get() : IValidator|null
- getViolations() : mixed
- isValid() : bool
- Determines if the provided value meets the validity criteria.
- remove() : bool
Methods
add()
public
add(string $name, IValidator $validator) : $this
Parameters
- $name : string
- $validator : IValidator
Return values
$this —Add a validator to the collection.
get()
public
get(string $name) : IValidator|null
Parameters
- $name : string
Return values
IValidator|nullgetViolations()
public
getViolations() : mixed
Return values
mixed —Returns the list of failed validations.
isValid()
Determines if the provided value meets the validity criteria.
public
isValid(mixed $value) : bool
Parameters
- $value : mixed
-
The value to be validated.
Return values
bool —Returns true if the value is valid, otherwise false.
remove()
public
remove(string $name) : bool
Parameters
- $name : string