WPDev.one
Core Function
View Source on Trac ↗

rest_validate_json_schema_pattern()

rest_validate_json_schema_pattern( mixed $pattern, mixed $value )

Validates if the JSON Schema pattern matches a value.

Parameters 2 required

Name / Type Description
$pattern
string

The pattern to match against.

Required
$value
string

The value to check.

Required

Return Value

(bool)
True if the pattern matches the given value, false otherwise.

Function Information

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