Rule
class Rule extends Rule
Class Rule.
Methods
No description
验证的字段必须完全是字母的字符
验证的字段可能具有字母、数字、破折号( - )以及下划线( _ )
验证字段必须是完全是字母、数字
string rule
StartWith
Ends With
正在验证的字段必须是给定日期之前的值
No description
No description
No description
大于
大于等于
小于
小于等于
身份证号 string rule
size
max
No description
date format
日期类型
日期范围
No description
No description
用户名验证, 支持子用户
No description
No description
mimetypes
No description
regex
No description
No description
和哪个字段相等
No description
No description
No description
No description
多个图片地址
Between String
最小数
No description
No description
No description
No description
No description
数字, 不包含 . 的数字, 也就是整数, 且长度 = $value
验证字段的长度介于min/max 之间, 正整数的长度
回调或者字段 此功能用于前端进行校验时候不会对字段值进行清理
Get an in constraint builder instance.
Not in
回调或者字段
No description
No description
No description
No description
Details
at line 19
static string
array()
No description
at line 28
static string
alpha()
验证的字段必须完全是字母的字符
at line 37
static string
alphaDash()
验证的字段可能具有字母、数字、破折号( - )以及下划线( _ )
at line 46
static string
alphaNum()
验证字段必须是完全是字母、数字
at line 55
static string
string()
string rule
at line 65
static string
startsWith(string $str)
StartWith
at line 75
static string
endsWith(string $str)
Ends With
at line 85
static string
before($field)
正在验证的字段必须是给定日期之前的值
at line 94
static string
beforeOrEqual($field)
No description
at line 103
static string
after($field)
No description
at line 112
static string
afterOrEqual($field)
No description
at line 122
static string
gt($field)
大于
at line 132
static string
gte($field)
大于等于
at line 142
static string
lt($field)
小于
at line 152
static string
lte($field)
小于等于
at line 163
static string
chid()
身份证号 string rule
at line 173
static string
size(int $length)
size
at line 183
static string
max(int|float $length)
max
at line 191
static string
boolean()
No description
at line 201
static string
dateFormat(string $format)
date format
at line 210
static string
date()
日期类型
at line 219
static string
dateRange()
日期范围
at line 227
static string
nullable()
No description
at line 235
static string
email()
No description
at line 245
static string
username(bool $sub = false)
用户名验证, 支持子用户
at line 256
static string
file()
No description
at line 264
static string
image()
No description
at line 274
static string
mimetypes(array $mimeTypes)
mimetypes
at line 282
static string
numeric()
No description
at line 292
static string
regex(string $regex)
regex
at line 300
static string
required()
No description
at line 308
static string
confirmed()
No description
at line 318
static string
same(string $field)
和哪个字段相等
at line 326
static string
mobile()
No description
at line 334
static string
password()
No description
at line 342
static string
simplePwd()
No description
at line 350
static string
url()
No description
at line 360
static string
urls()
多个图片地址
at line 371
static string
between(int|float $start, int|float $end)
Between String
at line 381
static string
min(int|float $value)
最小数
at line 389
static string
integer()
No description
at line 397
static string
json()
No description
at line 405
static string
ip()
No description
at line 413
static string
ipv4()
No description
at line 421
static string
ipv6()
No description
at line 431
static string
digits(int $value)
数字, 不包含 . 的数字, 也就是整数, 且长度 = $value
at line 442
static string
digitsBetween(int $min, int $max)
验证字段的长度介于min/max 之间, 正整数的长度
at line 454
static RequiredIf|string
requiredIf(bool|callable $callback, array $values = [])
回调或者字段 此功能用于前端进行校验时候不会对字段值进行清理
at line 467
static string
in(Arrayable|string|array $values)
Get an in constraint builder instance.
at line 483
static string
notIn(Arrayable|string|array $values)
Not in
at line 500
static string
requiredUnless(bool|callable $field, array $values = [])
回调或者字段
at line 509
static string
requiredWith(string|array $fields)
No description
at line 519
static string
requiredWithAll(string|array $fields)
No description
at line 529
static string
requiredWithout(string|array $fields)
No description
at line 539
static string
requiredWithoutAll(string|array $fields)
No description