mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
Remove phoneLength
validation
It appears that some valid phone numbers in some countries differ in length from what is specified in the util’s phone number format. Fixes #816.
This commit is contained in:
parent
e8543f0745
commit
56481c797e
1 changed files with 1 additions and 9 deletions
|
@ -397,14 +397,6 @@ module.exports = {
|
|||
waiting: false
|
||||
};
|
||||
},
|
||||
onValidSubmit: function (formData, reset, invalidate) {
|
||||
if (formData.phone.national_number.length !== formData.phone.country_code.format.length) {
|
||||
return invalidate({
|
||||
'phone': this.props.intl.formatMessage({id: 'teacherRegistration.validationPhoneNumber'})
|
||||
});
|
||||
}
|
||||
return this.props.onNextStep(formData);
|
||||
},
|
||||
render: function () {
|
||||
var formatMessage = this.props.intl.formatMessage;
|
||||
return (
|
||||
|
@ -418,7 +410,7 @@ module.exports = {
|
|||
tipContent={formatMessage({id: 'registration.nameStepTooltip'})} />
|
||||
</p>
|
||||
<Card>
|
||||
<Form onValidSubmit={this.onValidSubmit}>
|
||||
<Form onValidSubmit={this.props.onNextStep}>
|
||||
<PhoneInput label={formatMessage({id: 'teacherRegistration.phoneNumber'})}
|
||||
name="phone"
|
||||
defaultCountry={this.props.defaultCountry}
|
||||
|
|
Loading…
Reference in a new issue