Validate aliases, addresses and phone numbers in the send menu #176
@ -11,7 +11,7 @@ import (
|
||||
const (
|
||||
phoneRegex = `^(?:\+254|254|0)?((?:7[0-9]{8})|(?:1[01][0-9]{7}))$`
|
||||
kamikazechaser marked this conversation as resolved
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user
alias is same format as email? May want to have a look at https://emailregex.com/
No, it is not. This is the format that I picked from Sarafu's website
Your shortcode is a unique identifier that can be used by others to send you vouchers. It must be in the following format name@area
@Alfred-mk See https://github.com/grassrootseconomics/sarafu.network/issues/174 for Alias requirements