8 lines
165 B
Go
8 lines
165 B
Go
package validator
|
|
|
|
import "regexp"
|
|
|
|
var idRegexp = regexp.MustCompile(`^[a-zA-Z0-9\-_\.]+$`)
|
|
func ValidateID(id string) bool {
|
|
return idRegexp.MatchString(id)
|
|
}
|