mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2026-04-23 00:07:09 +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)
|
|
}
|