Commit 6e3a18a5 authored by Matthew Taylor's avatar Matthew Taylor

only look for empty phone on submit

thanks @rschamp!
parent 30945bc0
......@@ -416,7 +416,7 @@ module.exports = {
};
},
onValidSubmit: function (formData, reset, invalidate) {
if (formData.phone.national_number.length !== formData.phone.country_code.format.length) {
if (!formData.phone || formData.phone.national_number === '+') {
return invalidate({
'phone': this.props.intl.formatMessage({id: 'teacherRegistration.validationPhoneNumber'})
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment