#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 |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.7 |
| Component: | REST API | Version: | 4.7 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Specific types validation logic extracted from the
rest_validate_value_from_schemafunction into separate functions.Trac ticket: https://core.trac.wordpress.org/ticket/52375