Compare commits

..

No commits in common. "master" and "alias-period" have entirely different histories.

5 changed files with 9 additions and 9 deletions

View File

@ -3,7 +3,6 @@ package identity
import (
"regexp"
)
// Define the regex patterns as constants
const (
addressRegex = `^0x[a-fA-F0-9]{40}$`

View File

@ -39,6 +39,7 @@ func CalculateAgeWithYOB(yob int) int {
return currentYear - yob
}
//IsValidYob checks if the provided yob can be considered valid
func IsValidYOb(yob string) bool {
currentYear := time.Now().Year()

View File

@ -8,7 +8,6 @@ import (
// Define the regex patterns as constants
const (
// TODO: This should rather use a phone package to determine whether valid phone number for any region.
phoneRegex = `^(?:\+254|254|0)?((?:7[0-9]{8})|(?:1[01][0-9]{7}))$`
)

View File

@ -12,6 +12,7 @@ const (
//Allowed incorrect PIN attempts
AllowedPINAttempts = uint8(3)
)
// checks whether the given input is a 4 digit number