validate

package
v0.0.0-...-1272ae6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RegexpInt, _       = regexp.Compile("^-?\\d+$")                                                 // 检查整形
	RegexpFloat, _     = regexp.Compile("^-?\\d+(\\.\\d{0,3})?$")                                   // 检查浮点型
	RegexpMoney, _     = regexp.Compile("^\\d+(\\.\\d{0,3})?$")                                     // 检查金额
	RegexpUrl, _       = regexp.Compile("^https?://[\\w]+[(.\\w+){1,4}]/?[\\w=?&-_:*#&%\\[\\].]*$") // 检查链接
	RegexpDate, _      = regexp.Compile("^\\d{4}-\\d{2}-\\d{2}$")                                   // 检查日期
	RegexpNumberSet, _ = regexp.Compile("^(\\d+)(,\\d+)*$")                                         // 检查一组连续的数字
	RegexpColorCode, _ = regexp.Compile("^[a-fA-F0-9]{6}$")                                         // 检查一组颜色代码
	RegexpMd5, _       = regexp.Compile("^[a-f0-9]{32}$")                                           // 检查是否是md5字符串
	RegexpZhPhone, _   = regexp.Compile("^1\\d{10}$")                                               // 检查中国大陆手机号
)
View Source
var VStruct = new(validate)

数据验证对象

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL