forked from urdt/ussd
updated the regex to match all Kenyan numbers
This commit is contained in:
parent
212cd48249
commit
8421feb757
@ -37,7 +37,7 @@ var (
|
||||
|
||||
// Define the regex patterns as constants
|
||||
const (
|
||||
phoneRegex = `(\(\d{3}\)\s?|\d{3}[-.\s]?)?\d{3}[-.\s]?\d{4}`
|
||||
phoneRegex = `^(?:\+254|254|0)?((?:7[0-9]{8})|(?:1[01][0-9]{7}))$`
|
||||
pinPattern = `^\d{4}$`
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user