fix(client,server): usernames should not be a http error code (#37804)
* fix(client,server): usernames should not be a http error code * feat: reject invalid chars first Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@ import {
|
||||
} from '../../redux/settings';
|
||||
import BlockSaveButton from '../helpers/form/BlockSaveButton';
|
||||
import FullWidthRow from '../helpers/FullWidthRow';
|
||||
import { validate } from '../../../../utils/validate';
|
||||
import { isValidUsername } from '../../../../utils/validate';
|
||||
|
||||
const propTypes = {
|
||||
isValidUsername: PropTypes.bool,
|
||||
@@ -112,7 +112,7 @@ class UsernameSettings extends Component {
|
||||
}
|
||||
|
||||
validateFormInput(formValue) {
|
||||
return validate(formValue);
|
||||
return isValidUsername(formValue);
|
||||
}
|
||||
|
||||
renderAlerts(validating, error, isValidUsername) {
|
||||
|
Reference in New Issue
Block a user