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

WordPress Trac noreply at wordpress.org
Sun Dec 4 17:15:14 UTC 2016


#39054: REST API: Improve error messages for number relational validation
-------------------------+-----------------------------
 Reporter:  jblz         |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  REST API     |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:  rest-api     |
-------------------------+-----------------------------
 For a simple relation (i.e. when not describing that a value should be
 `between` two bounds), using the `exclusive` & `inclusive` modifiers
 aren't as readable as they could be.

 When the relation is `exclusive`, `greater than` implies the exclusivity.
 When the relation is `inclusive`, `greater than or equal to` would be
 easier to read.

 For example, calling `/media?page=0` currently returns: `page must be
 greater than 1 (inclusive)`.
 I'd expect it to say: `page must be greater than or equal to 1`

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


More information about the wp-trac mailing list