From 2e3aee25d9b1f13f76df64a32e1ffdb71b7313eb Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Thu, 1 Sep 2016 16:22:45 -0400 Subject: [PATCH] cover `undefined` case as well thanks @rschamp! --- src/components/registration/steps.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/registration/steps.jsx b/src/components/registration/steps.jsx index f8160079e..45e3064d9 100644 --- a/src/components/registration/steps.jsx +++ b/src/components/registration/steps.jsx @@ -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'}) });