mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2025-09-27 03:15:55 +08:00
12 lines
185 B
Go
12 lines
185 B
Go
package validx
|
|
|
|
import (
|
|
"regexp"
|
|
)
|
|
|
|
// IsNumber 验证是否全部为数字
|
|
func IsNumber(input string) bool {
|
|
reg := regexp.MustCompile("^[0-9]+$")
|
|
return reg.MatchString(input)
|
|
}
|