File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 3333
3434// Builder approach
3535
36- $ validator = $ validate ->valueValidator ();
36+ $ validator = $ validate ->validator ();
3737$ document = $ validator ->rule ()->addDocument ();
3838
3939$ document ->valueField ('name ' )
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 ) {
Original file line number Diff line number Diff line change 1616
1717// The standard approach
1818
19- $ validator = $ validate ->valueValidator ();
19+ $ validator = $ validate ->validator ();
2020$ document = $ validator ->rule ()->addDocument ();
2121
2222$ document ->valueField ('name ' )
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 ()
You can’t perform that action at this time.
0 commit comments