We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13e7ddf commit 4c1ba48Copy full SHA for 4c1ba48
README.md
@@ -85,7 +85,7 @@ class SomeController
85
['freeTime', 'number'],
86
]);
87
88
- if ($v->fail()) {
+ if ($v->isFail()) {
89
var_dump($v->getErrors());
90
var_dump($v->firstError());
91
}
@@ -199,7 +199,7 @@ class PageRequest extends Validation
199
$v = PageRequest::check($_POST);
200
201
// 验证失败
202
-if ($v->fail()) {
+if ($v->isFail()) {
203
204
205
@@ -242,7 +242,7 @@ class DataModel
242
243
public function create()
244
{
245
- if ($this->validate()->fail()) {
+ if ($this->validate()->isFail()) {
246
return false;
247
248
0 commit comments