mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
Empty Phone Number Validation
Separated the null check from the area code check so that when the field is null the 'required' popup will be displayed.
This commit is contained in:
parent
fa1b6c6c00
commit
10e49d87b3
1 changed files with 5 additions and 1 deletions
|
@ -455,7 +455,11 @@ module.exports = {
|
|||
};
|
||||
},
|
||||
onValidSubmit: function (formData, reset, invalidate) {
|
||||
if (!formData.phone || formData.phone.national_number === '+') {
|
||||
if (!formData.phone) {
|
||||
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'})
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue