You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package validation
|
|
|
|
import (
|
|
val "github.com/go-playground/validator/v10"
|
|
"regexp"
|
|
)
|
|
|
|
func alphaNumDashDot(fl val.FieldLevel) bool {
|
|
return regexp.MustCompile(`^[a-zA-Z0-9-.]+$`).MatchString(fl.Field().String())
|
|
}
|