File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+
2+
3+
4+
5+ ### 🟦 类型类
6+
7+ - ` StringRule ` :内容必须为字符串
8+ - ` IntegerRule ` :内容必须为整数
9+ - ` BooleanRule ` :内容必须为布尔值 true/false
10+ - ` ArrayRule ` :内容必须为数组
11+ - ` ObjectRule ` :内容必须为对象
12+ - ` FloatRule ` :内容必须为浮点数
13+ - ` NumericRule ` :内容必须为数字(包含整数、小数、科学计数法等)
14+
15+ ---
16+
17+ ### 🟩 比较类
18+
19+ - ` MinRule ` :数值大小或字符串长度不允许小于指定值
20+ - ` MaxRule ` :数字大小或字符串长度不允许超过指定值
21+ - ` BetweenRule ` :数字大小或字符串长度必须在指定的最小值和最大值之间
22+ - ` LengthRule ` :字符串长度必须等于指定值
23+ - ` MinLengthRule ` :字符串的长度不允许小于指定值
24+ - ` MaxLengthRule ` :字符串的长度不允许超过指定值
25+ - ` GtRule ` :数字必须大于指定值
26+ - ` LtRule ` :数字必须小于指定值
27+ - ` GteRule ` :数字必须大于或等于指定值
28+ - ` LteRule ` :数字必须小于或等于指定值
29+
30+ ---
31+
32+ ### 🟨 格式类
33+
34+ - ` EmailRule ` :内容必须是邮箱格式
35+ - ` MobileRule ` :内容必须是中国大陆手机号格式
36+ - ` UrlRule ` :内容必须是URL
37+ - ` IpRule ` :内容必须是有效的 IP 地址(IPv4 或 IPv6)
38+ - ` JsonRule ` :内容必须是有效的Json字符串
39+ - ` AlphaRule ` :内容只能包含字母
40+ - ` AlphaNumRule ` :内容只能包含字母和数字
41+ - ` AlphaDashRule ` :内容只能包含字母、数字、破折号、下划线
42+
43+ ---
44+
45+ ### 🟥 布尔类
46+
47+ - ` RequiredRule ` :内容必须存在且不为空
48+ - ` AcceptedRule ` :内容只能为 yes、on、1、true
49+ - ` DeclinedRule ` :内容只能为 no、off、0、false
50+
51+ ---
52+
53+ ### 🟪 自定义类
54+
55+ - ` StartsWithRule ` :内容必须以指定字符串开头
56+ - ` EndsWithRule ` :内容必须以指定字符串结尾
57+ - ` ContainsRule ` :内容必须包含指定字符串
You can’t perform that action at this time.
0 commit comments