Valdi\Validator\ValidatorInterface

interface Valdi\Validator\ValidatorInterface
The interface each validator has to implement.
isValid()

Validates the given value.

Parameters:
  • $value (mixed) – the value to validate
  • $parameters (array) – the other parameters the validator might need
Returns:

boolean $ true if the value is valid, false else

getInvalidDetails()

Gets the details if the validation failed.

Returns:mixed $ the details