@@ -13,25 +13,31 @@ public function testValidator() {
1313 //->addRule('c', 'required')
1414 //->addRule('a.b.c', 'required')
1515 //->addRule('d.e', 'required')
16- ->addRule ('f.x.* ' , 'numeric ' )
17- ->addRule ('w.x.*.a ' , 'required|numeric|max:5 ' )
18- ->addRule ('y.*.a ' , 'required|numeric|max:5 ' )
16+ //->addRule('f.x.*', 'numeric')
17+ //->addRule('w.x.*.a', 'required|numeric|max:5')
18+ //->addRule('y.*.a', 'required|numeric|max:5')
19+ //->addRule('*', 'required|numeric|max:5')
20+ ->addRule ("a.b.*.c " , 'present|required ' )
1921 ;
2022
2123 $ valores = [];
2224
23- for ($ i = 0 ; $ i < 5 ; $ i ++) {
24- $ valores [] = ["a " => $ i ];
25+ for ($ i = 0 ; $ i < 10 ; $ i ++) {
26+ //$valores[] = ["a" => $i];
27+ $ valores [] = $ i ;
2528 }
2629
27- $ ret = $ validator ->validate ([
28- 'c ' => 10 ,
29- 'a ' => ['b ' => 1 ],
30- 'd ' => ['e ' => []],
31- 'f ' => ['x ' => [1 , 2 , 3 , '23x ' ]],
32- 'w ' => ['x ' => [["a " => "1 " ], ["a " => "1 " ], ["a " => "20 " ]]],
33- 'y ' => $ valores
34- ]);
30+ //$ret = $validator->validate([
31+ // 'c' => 10,
32+ // 'a' => ['b' => 1],
33+ // 'd' => ['e' => []],
34+ // 'f' => ['x' => [1, 2, 3, '23x']],
35+ // 'w' => ['x' => [["a" => "1"], ["a" => "1"], ["a" => "20"]]],
36+ // 'y' => $valores
37+ //]);
38+ //$ret = $validator->validate($valores);
39+
40+ $ ret = $ validator ->validate (["a " => ["b " => [["c " => null ]]]]);
3541
3642 print_r ($ ret );
3743
0 commit comments