Skip to content

Commit 114eae0

Browse files
committed
changed method names
1 parent 2e5abdc commit 114eae0

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

examples/document.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
// Builder approach
3535

36-
$validator = $validate->valueValidator();
36+
$validator = $validate->validator();
3737
$document = $validator->rule()->addDocument();
3838

3939
$document->valueField('name')
@@ -80,11 +80,9 @@
8080
->addFilter()
8181
->alpha();
8282

83-
$validator = $validate->validator($document);
84-
8583
// Or a callback approach
8684

87-
$validator = $validate->valueValidator(function($value) {
85+
$validator = $validate->validator(function($value) {
8886
$value->document(function($document) {
8987
$document
9088
->field('name', function($name) {

examples/simple.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
// The standard approach
1818

19-
$validator = $validate->valueValidator();
19+
$validator = $validate->validator();
2020
$document = $validator->rule()->addDocument();
2121

2222
$document->valueField('name')
@@ -72,7 +72,7 @@
7272

7373
// The callback approach
7474

75-
$validator = $validate->valueValidator(function($value) {
75+
$validator = $validate->validator(function($value) {
7676
$value->document(function($document) {
7777
$document
7878
->allowExtraFields()

0 commit comments

Comments
 (0)