Skip to content

Commit 4c1ba48

Browse files
authored
Update README.md
1 parent 13e7ddf commit 4c1ba48

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class SomeController
8585
['freeTime', 'number'],
8686
]);
8787

88-
if ($v->fail()) {
88+
if ($v->isFail()) {
8989
var_dump($v->getErrors());
9090
var_dump($v->firstError());
9191
}
@@ -199,7 +199,7 @@ class PageRequest extends Validation
199199
$v = PageRequest::check($_POST);
200200

201201
// 验证失败
202-
if ($v->fail()) {
202+
if ($v->isFail()) {
203203
var_dump($v->getErrors());
204204
var_dump($v->firstError());
205205
}
@@ -242,7 +242,7 @@ class DataModel
242242

243243
public function create()
244244
{
245-
if ($this->validate()->fail()) {
245+
if ($this->validate()->isFail()) {
246246
return false;
247247
}
248248

0 commit comments

Comments
 (0)