Valdi\Validator\ValidatorInterface

interface ValidatorInterface

The interface each validator has to implement.

isValid($value, $parameters)

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