REST API: Correct error code for the maxItems keyword.

See [50007]. 


git-svn-id: https://develop.svn.wordpress.org/trunk@50461 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Timothy Jacobs 2021-03-01 16:30:41 +00:00
parent f2367e643b
commit 30b82c6bee

View File

@ -2365,7 +2365,7 @@ function rest_validate_array_value_from_schema( $value, $args, $param ) {
if ( isset( $args['maxItems'] ) && count( $value ) > $args['maxItems'] ) {
return new WP_Error(
'test_too_many_items',
'rest_too_many_items',
/* translators: 1: Parameter, 2: Number. */
sprintf(
_n(