Valdi\Validator\AbstractArray

class AbstractArray

Validator for array data, be it maps or lists.

property invalidDetails

protected

Holds the invalid values.

isValidArray($values, Validator $validator, $rules)

Checks whether the given values are of the expected array data.

Parameters:
  • $values (mixed) – the potential array values to check
  • $validator (Validator) – the validator to check with
  • $rules (array) – the rules which the array data must fulfill
Returns:

boolean true if all the $values are valid, else false with the invalid details set

isValid($value, $parameters)

{@inheritdoc}

Parameters:
  • $value
  • $parameters
getInvalidDetails()

Gets the details if the validation failed.

Returns:mixed the details