Users: Merge two similar error messages about usernames with invalid characters.

Props ramiy, garrett-eclipse, chetan200891.
Fixes #47003.

git-svn-id: https://develop.svn.wordpress.org/trunk@48195 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-06-27 23:43:01 +00:00
parent 43236dea96
commit cececce972

View File

@ -1245,7 +1245,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
if ( ! validate_username( $username ) ) {
return new WP_Error(
'rest_user_invalid_username',
__( 'Username contains invalid characters.' ),
__( 'This username is invalid because it uses illegal characters. Please enter a valid username.' ),
array( 'status' => 400 )
);
}