[wp-trac] [WordPress Trac] #39054: REST API: Improve error messages for number relational validation

WordPress Trac noreply at wordpress.org
Sun Dec 4 19:30:30 UTC 2016


#39054: REST API: Improve error messages for number relational validation
----------------------------------------+-----------------------
 Reporter:  jblz                        |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  4.7.1
Component:  REST API                    |     Version:  trunk
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:  rest-api
----------------------------------------+-----------------------

Comment (by jblz):

 Thanks for taking a look & for the pointer to the schema tests, @jnylen0.

 There's already some coverage around the general behavior in
 [https://core.trac.wordpress.org/browser/trunk/tests/phpunit/tests/rest-
 api/rest-schema-validation.php?rev=39296#L14 `test_type_number`] &
 [https://core.trac.wordpress.org/browser/trunk/tests/phpunit/tests/rest-
 api/rest-schema-validation.php?rev=39296#L26 `test_type_integer`]. I
 updated the patch to include a check when the value is below the `minimum`
 bound.

 Do you think we should update the above tests to check the message similar
 to [https://core.trac.wordpress.org/browser/trunk/tests/phpunit/tests
 /rest-api/rest-categories-controller.php?rev=39126#L189 the test] I had to
 update here already or do you think the updated patch suffices?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39054#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list