Skip to content

Commit ee1f71f

Browse files
author
vikasrohit
authored
Merge pull request #2678 from appirio-tech/hotifx/phone-validation
[HOTFIX] [PROD] fix phone validation to require country code
2 parents 606bd73 + 9e82dd9 commit ee1f71f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/routes/settings/routes/profile/components/ProfileSettingsForm.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ class ProfileSettingsForm extends Component {
4040
let validations = null
4141
if (name === 'businessPhone') {
4242
validations = {
43-
matchRegexp: /^([+]?\d{1,2}[.-\s]?)?(\d{3}[.-]?){2}\d{4}$/
43+
// use same regexp as on server side
44+
matchRegexp: /^\+(?:[0-9] ?){6,14}[0-9]$/
4445
}
4546
} else if (name === 'firstNLastName') {
4647
validations = {

0 commit comments

Comments
 (0)