From 21941ecf86150adcc64d7f968e43afda4fca0e6b Mon Sep 17 00:00:00 2001 From: The_Grits Date: Fri, 4 Nov 2016 11:51:48 -0400 Subject: [PATCH] Phone Number 'Required' Validation --- src/components/registration/steps.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/registration/steps.jsx b/src/components/registration/steps.jsx index ab6a11028..a9182ce6e 100644 --- a/src/components/registration/steps.jsx +++ b/src/components/registration/steps.jsx @@ -455,14 +455,10 @@ module.exports = { }; }, onValidSubmit: function (formData, reset, invalidate) { - if (!formData.phone) { + if (!formData.phone || formData.phone.national_number === '+') { return invalidate({ 'phone': this.props.intl.formatMessage({id: 'teacherRegistration.validationRequired'}) }); - } else if (formData.phone.national_number === '+') { - return invalidate({ - 'phone': this.props.intl.formatMessage({id: 'teacherRegistration.validationPhoneNumber'}) - }); } return this.props.onNextStep(formData); },