Selected the optional form field for user registration.
When a user attempts to register, they receive the error 'No phone number provided.'
I tried turning off the validation module and incurred the same problem.
If you need more information, please let me know.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | optional_field_on-2509098-13.patch | 3.02 KB | almaudoh |
| #13 | optional_field_on-2509098-13-FAIL.patch | 2.31 KB | almaudoh |
| #9 | interdiff.txt | 681 bytes | almaudoh |
| #9 | optional_field_on-2509098-9.patch | 2.62 KB | almaudoh |
| #7 | optional_field_on-2509098-7-FAIL.patch | 1.96 KB | almaudoh |
Comments
Comment #1
nDigitHQ commentedComment #2
nDigitHQ commentedComment #3
nDigitHQ commentedComment #4
nDigitHQ commentedUpdated the issue. Problem is with both the dev and alpha branches.
The function sms_user_validate_number_element doesn't check to see if the field is optional. It passes it to the validation no matter what.
Comment #5
nDigitHQ commentedWas able to patch it without git. Could you please roll this into the next release?
Comment #6
almaudoh commentedNeed to write a failing test for this bug first.
Comment #7
almaudoh commentedUploaded failing test...
Comment #9
almaudoh commentedThis patch may fix the bug, but also introduces another one - the validation will no more work when you supply a mobile number in the optional textbox.
Attached patch fixes it where the problem lies - in the
sms_validate_number()function.Tests also pass.
Comment #11
almaudoh commentedCommitted / pushed to 7.x-1.x
Comment #12
almaudoh commentedNeed to port this to 8.x-1.x branch.
Comment #13
almaudoh commentedD8 patch...
Comment #16
almaudoh commentedCommitted and pushed D8 port to 8.x-1.x
Comment #17
nDigitHQ commentedThank you!