parent
737599fbed
commit
3efd29c91f
|
@ -1,6 +1,7 @@
|
||||||
package validator
|
package validator
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"log"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -34,3 +35,7 @@ func validateNumericString(fl validator.FieldLevel) bool {
|
||||||
str := fl.Field().String()
|
str := fl.Field().String()
|
||||||
return strings.TrimSpace(str) != "" && regexp.MustCompile(`^[0-9]+$`).MatchString(str)
|
return strings.TrimSpace(str) != "" && regexp.MustCompile(`^[0-9]+$`).MatchString(str)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func test() {
|
||||||
|
log.Println("test")
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue