Skip to content

Commit 5529e20

Browse files
author
Dilyn Corbett
committed
Modified regex to allow edge cases
1 parent 8b9e369 commit 5529e20

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

runner/src/server/forms/ReportAnOutbreak.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2925,7 +2925,7 @@
29252925
"type": "listRef"
29262926
},
29272927
"schema": {
2928-
"regex": "^(?!0{5,})(?:\\+44|0)[0-9\\s()-]{8,16}$"
2928+
"regex": "^(?!\\s)(?!0+$)(?!.*(\\d)\\1{6,})(?=(?:\\D*\\d){10,12}\\D*(?:\\s?#\\d{3,4})?$)(?:\\+44|0|\\(0\\d{2,4}\\))[0-9\\s()]+(?:\\s?#\\d{3,4})?$"
29292929
}
29302930
},
29312931
{
@@ -3009,7 +3009,7 @@
30093009
"type": "listRef"
30103010
},
30113011
"schema": {
3012-
"regex": "^(?!0{5,})(?:\\+44|0)[0-9\\s()-]{8,16}$"
3012+
"regex": "^(?!\\s)(?!0+$)(?!.*(\\d)\\1{6,})(?=(?:\\D*\\d){10,12}\\D*(?:\\s?#\\d{3,4})?$)(?:\\+44|0|\\(0\\d{2,4}\\))[0-9\\s()]+(?:\\s?#\\d{3,4})?$"
30133013
}
30143014
},
30153015
{

0 commit comments

Comments
 (0)