Valdi\Validator\Value

class Value

Validator for equal values.

property type

protected

Holds the type of the validator.

property amountOfParameters

protected

Holds the amount of parameters.

isValidComparison($value, $parameters)

{@inheritdoc}

Parameters:
  • $value
  • $parameters
isAllNumeric()

Checks whether all given parameters are numeric.

Returns:boolean true if all values are numeric
isValid($value, $parameters)

{@inheritdoc}

Parameters:
  • $value
  • $parameters
getInvalidDetails()

{@inheritdoc}

validateParameterCount($name, $parameterAmount, $parameters)

Throws an exception if the parameters don’t fulfill the expected parameter count.

Parameters:
  • $name (string) – the name of the validator
  • $parameterAmount (integer) – the amount of expected parameters
  • $parameters (string[]) – the parameters