updated the regex to match all Kenyan numbers

This commit is contained in:
Alfred Kamanda 2024-11-20 14:59:33 +03:00
parent 212cd48249
commit 8421feb757
Signed by untrusted user: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -37,7 +37,7 @@ var (
// Define the regex patterns as constants // Define the regex patterns as constants
const ( 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}$` pinPattern = `^\d{4}$`
) )