Solar_Filter_ValidateInList::validateInList()

public bool Solar_Filter_ValidateInList::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.



Local