Validating custom types can cause unexpected panic.
Example of a custom type:
type Gender string
const (
GenderMale Gender= "male"
GenderFemale = "female"
)
If we then try to validate something of this type with, say, the string rule, we get a panic.