Skip to content

Commit 4e1fb41

Browse files
committed
up readme
1 parent f45fbbd commit 4e1fb41

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

README.md

+23-3
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,32 @@
1616
- 方便的获取错误信息,验证后的安全数据获取
1717
- 已经内置了40多个常用的验证器[内置验证器](#built-in-validators)
1818
- 规则设置参考自 yii 的。部分规则参考自 laravel
19+
- 新增了独立的过滤器 `Inhere\Validate\Filter\Filtration` 用于数据过滤
20+
21+
22+
支持两种规则配置方式:
23+
1924
- `Validation/RuleValidation` 规则配置类似于Yii: 每条规则中,允许多个字段,但只能有一个验证器。
20-
- e.g `['tagId,userId,name,email,freeTime', 'required', ...]`(下面的示例都是这种)
25+
26+
e.g (下面的示例都是这种)
27+
28+
```php
29+
[
30+
['tagId,userId,name,email,freeTime', 'required', ...],
31+
// ... ...
32+
];
33+
```
34+
2135
- `FieldValidation` 规则配置类似于Laravel: 每条规则中,只能有一个字段,但允许多个验证器。
22-
- e.g `['field', 'required|string:5,10|...', ...]`
2336

24-
> 新增了独立的过滤器 `Inhere\Validate\Filter\Filtration` 用于数据过滤
37+
e.g
38+
39+
```php
40+
[
41+
['field', 'required|string:5,10|...', ...],
42+
// ... ...
43+
]
44+
```
2545

2646
## 项目地址
2747

0 commit comments

Comments
 (0)