update the alias regex to be alphanumeric

This commit is contained in:
Alfred Kamanda 2024-11-25 15:02:28 +03:00
parent 2a36b31750
commit e8bed3b07b
Signed by untrusted user: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -11,7 +11,7 @@ import (
const (
phoneRegex = `^(?:\+254|254|0)?((?:7[0-9]{8})|(?:1[01][0-9]{7}))$`
addressRegex = `^0x[a-fA-F0-9]{40}$`
aliasRegex = `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+$`
aliasRegex = `^[a-zA-Z0-9]+$`
)
// IsValidPhoneNumber checks if the given number is a valid phone number