mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
10 lines
217 B
Go
10 lines
217 B
Go
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())
|
|
}
|