[wp-trac] [WordPress Trac] #50189: Only validate format if type is string
WordPress Trac
noreply at wordpress.org
Sat Jul 4 19:51:24 UTC 2020
#50189: Only validate format if type is string
-------------------------------------------------+-------------------------
Reporter: TimothyBlynJacobs | Owner:
| TimothyBlynJacobs
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.5
Component: REST API | Version: 5.3
Severity: normal | Resolution: fixed
Keywords: needs-patch needs-unit-tests good- | Focuses: rest-api
first-bug json-schema |
-------------------------------------------------+-------------------------
Changes (by TimothyBlynJacobs):
* owner: (none) => TimothyBlynJacobs
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"48300" 48300]:
{{{
#!CommitTicketReference repository="" revision="48300"
REST API: Only validate the format keyword if the type is a string.
This allows for using multi-type support with a string that has a format.
For backwards compatibility support, the format validation will still
apply if the type is not specified, or it is invalid.
Two new doing it wrong notices are issued when omitting a type, or using
an invalid type.
Props ryotsun.
Fixes #50189.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50189#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list