WPDev.one
Core Function
View Source on Trac ↗

rest_find_any_matching_schema()

rest_find_any_matching_schema( mixed $value, mixed $args, mixed $param )

Finds the matching schema among the "anyOf" schemas.

Parameters 3 required

Name / Type Description
$value
mixed

The value to validate.

Required
$args
array

The schema array to use.

Required
$param
string

The parameter name, used in error messages.

Required

Return Value

((array)
| WP_Error) The matching schema or WP_Error instance if all schemas do not match.

Function Information

Since Version
5.6.0
Source File
wp-includes/rest-api.php
Advertisement