rest_find_one_matching_schema
rest_find_one_matching_schema ( $value, $args, $param, $stop_after_first_match = false )
Parameters:- (mixed) value The value to validate.
- (array) args The schema array to use.
- (string) param The parameter name, used in error messages.
- (bool) stop_after_first_match Optional. Whether the process should stop after the first successful match.
Returns:- (array|WP_Error) The matching schema or WP_Error instance if the number of matching schemas is not equal to one.
Defined at: - Introduced in WordPress: 5.6.0
- Deprecated in WordPress: —
Description
Finds the matching schema among the "oneOf" schemas.