cover undefined case as well

thanks @rschamp!
This commit is contained in:
Matthew Taylor 2016-09-01 16:22:45 -04:00
parent ffa249c3c5
commit 2e3aee25d9

View file

@ -91,7 +91,7 @@ module.exports = {
},
validateUsername: function (username, callback) {
callback = callback || function () {};
if (username.length < 1) {
if (!username) {
this.refs.form.refs.formsy.updateInputsWithError({
'user.username': formatMessage({id: 'teacherRegistration.validationRequired'})
});