#52375 closed enhancement (fixed)
Extract the validation of specific data types from rest_validate_value_from_schema() into separate functions
Reported by: | yakimun | Owned by: | TimothyBlynJacobs |
---|---|---|---|
Milestone: | 5.7 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | REST API | Keywords: | has-patch |
Focuses: | Cc: |
Description
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.
Change History (4)
This ticket was mentioned in PR #924 on WordPress/wordpress-develop by yakimun.
4 years ago
#1
- Keywords has-patch added
#2
@
4 years ago
- Milestone changed from Awaiting Review to 5.7
- Version set to 4.7
Thanks for the patch, this is a great improvement @yakimun!
#3
@
4 years ago
- Owner set to TimothyBlynJacobs
- Resolution set to fixed
- Status changed from new to closed
In 50060:
TimothyBJacobs commented on PR #924:
4 years ago
#4
Note: See
TracTickets for help on using
tickets.
Specific types validation logic extracted from the
rest_validate_value_from_schema
function into separate functions.Trac ticket: https://core.trac.wordpress.org/ticket/52375