barcodes/validation/charsets.go
2023-09-01 20:50:47 +01:00

14 lines
388 B
Go

package validation
import "regexp"
var (
ASCII = regexp.MustCompile(`^[\x00-\x7F]+$`)
ANY = regexp.MustCompile(`.`)
CODABAR = regexp.MustCompile(`^[0-9-$:/.+]+$`)
CODE39 = regexp.MustCompile(`^[0-9A-Z\-\.\ $%*+/]+$`)
CODE93 = regexp.MustCompile(`^[A-Za-z0-9\-.\$/\+%\s]+$`)
NUMERAL = regexp.MustCompile(`^[0-9]+$`)
ISO88591 = regexp.MustCompile(`^[\x00-\xFF]+$`)
)