Previous Page
locale()

Solar_Filter_ValidateInKeys
validateInKeys()

Next Class
Solar_Filter_ValidateInList

validateInKeys()

public bool validateInKeys ( mixed $value, array $array )

Validates that the value is a key in the list of allowed options.

Parameters

  • (mixed) $value: The value to validate.
  • (array) $array: An array of allowed options.

Returns

  • (bool) True if valid, false if not.

Description

Validates that the value is a key in the list of allowed options.

Given an array (second parameter), the value (first parameter) must match at least one of the array keys.