wpseek.com
A WordPress-centric search engine for devs and theme authors



rest_validate_enum › WordPress Function

Since5.7.0
Deprecatedn/a
rest_validate_enum ( $value, $args, $param )
Parameters: (3)
  • (mixed) $value The value to validate.
    Required: Yes
  • (array) $args The schema array to use.
    Required: Yes
  • (string) $param The parameter name, used in error messages.
    Required: Yes
Returns:
  • (true|WP_Error) True if the "enum" contains the value or a WP_Error instance otherwise.
Defined at:
Codex:

Validates that the given value is a member of the JSON Schema "enum".



Source

Soon...