diff --git a/src/components/registration/steps.jsx b/src/components/registration/steps.jsx index 3df19db70..f8160079e 100644 --- a/src/components/registration/steps.jsx +++ b/src/components/registration/steps.jsx @@ -91,6 +91,13 @@ module.exports = { }, validateUsername: function (username, callback) { callback = callback || function () {}; + if (username.length < 1) { + this.refs.form.refs.formsy.updateInputsWithError({ + 'user.username': formatMessage({id: 'teacherRegistration.validationRequired'}) + }); + return callback(false); + } + api({ host: '', uri: '/accounts/check_username/' + username + '/'