Commit 09167ae
fix(questionnaire): added phone number requirements (#283)
* fix(questionnaire): added phone number requirement
using a regex to require users to input a valid phone number and
stripped non numbers from the stored value with the exception of the
country code
* fix(questionnaire): edited callback to pass test
edit call back that removes non-numbers from phone number to pass
testing
* fix(questionnaire): edited test to fail with phone formatting
edited test to fail if the phone # formating is still there when saved
into the database. Also stopped exception for "+" as it was not
necessary.
* fix(questionnaire): fixed comment about phone number stripping
* fix: houndci formatting comments
* fix: earlier fix was incorrect. correct houndci fix
* fix(phone): implmented changed phone number regex for validation
implement suggested regex although made internation extention 3 instead
of 2 digits long for max length
* fix(questionnaire): added support for more international numbers
made the numbers regex more flexable to support more international
numbers such as in Nigeria with two digit area codes.
* Phone validation hit, remove duplicate check
Co-authored-by: Chris Baudouin, Jr <[email protected]>
Co-authored-by: Peter Kos <[email protected]>1 parent c9d6658 commit 09167ae
File tree
4 files changed
+17
-2
lines changed- app
- assets/javascripts
- models
- views/questionnaires
- test/controllers/manage
4 files changed
+17
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
43 | 52 | | |
44 | 53 | | |
45 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
141 | 147 | | |
142 | 148 | | |
143 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
| 393 | + | |
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| |||
0 commit comments