Previous Page
locale()

Solar_Filter_ValidateInList
validateInList()

Next Class
Solar_Filter_ValidateInt

validateInList()

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

Validates that the value is in a list of allowed values.

Parameters

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

Returns

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

Description

Validates that the value is in a list of allowed values.

Strict checking is enforced, so a string "1" is not the same as an integer 1. This helps to avoid matching 0 and empty, etc.