Skip to content

Release v1.0.1

Latest
Compare
Choose a tag to compare
@nikitaksv nikitaksv released this 06 Oct 21:56
· 6 commits to main since this release

Method Apply returned error with masked value

// Ex. phone number
maskedValue, _ := strmask.Apply("+0 (000) 000-00-00", "12345678900")
fmt.Println(maskedValue) // out: +1 (234) 567-89-00

// Ex. phone number with err
maskedValue, err := strmask.Apply("+0 (000) 000-00-00", "12345")
if err != nil {
	fmt.Println(err) // out: invalid value
}
fmt.Println(maskedValue) // but maskedValue out: +1 (234) 5

New Mask Symbols

Symbol Meaning
# Requires a unicode letter or digit at this position
l Requires a unicode letter (will be lower) at this position
U Requires a unicode letter (will be upper) or digit at this position
u Requires a unicode letter (will be upper) at this position