[wp-trac] [WordPress Trac] #52375: Extract the validation of specific data types from rest_validate_value_from_schema() into separate functions
WordPress Trac
noreply at wordpress.org
Tue Jan 26 11:59:17 UTC 2021
#52375: Extract the validation of specific data types from
rest_validate_value_from_schema() into separate functions
-------------------------+-----------------------------
Reporter: yakimun | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
The current implementation of the `rest_validate_value_from_schema`
function contains a lot of code and is difficult to read. Most of the code
of this function is related to the validation of specific data types.
We can extract the type validation logic into separate functions to
improve readability and maintainability.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52375>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list