Merge pull request #985 from TheGrits/patch-2

Fix gh-706: "This field is required" when phone number is null
This commit is contained in:
Matthew Taylor 2016-11-07 10:28:31 -05:00 committed by GitHub
commit f7f4ed466e

View file

@ -457,7 +457,7 @@ module.exports = {
onValidSubmit: function (formData, reset, invalidate) { onValidSubmit: function (formData, reset, invalidate) {
if (!formData.phone || formData.phone.national_number === '+') { if (!formData.phone || formData.phone.national_number === '+') {
return invalidate({ return invalidate({
'phone': this.props.intl.formatMessage({id: 'teacherRegistration.validationPhoneNumber'}) 'phone': this.props.intl.formatMessage({id: 'teacherRegistration.validationRequired'})
}); });
} }
return this.props.onNextStep(formData); return this.props.onNextStep(formData);