-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix: phone number compulsory field remove #3378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing validation does not make a field optional, Read more about UI Validations.
|
@kushthedude yes that's true, but here it was the compulsory field made by validation so no other way to make it optional. |
Are you sure ? |
| }, | ||
| { | ||
| type : 'regExp', | ||
| value : validPhoneNumber, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that after removing an "empty" type, a validator can't allow empty input in the phone field. so I just remove it and add inputtype=number.
| prompt : this.l10n.t('Please enter a valid email ID') | ||
| } | ||
| ] | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for help, I made some unwanted changes. I have made requested changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dont change the other linea
| optional : true, | ||
| rules : [ | ||
| { | ||
| type : 'empty', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the empty rule completely, optional and empty both don't make sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
| }, | ||
| phone: { | ||
| identifier : 'phone', | ||
| optional : true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need optional here?
Fixes #3289
Short description of what this resolves:
In the profile section, a phone number was a compulsory field, so I made it an optional field
Checklist
developmentbranch.