File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public function rules()
2121 ['test ' , 'number ' , 'when ' => function ($ data ) {
2222 return isset ($ data ['status ' ]) && $ data ['status ' ] > 2 ;
2323 }],
24- ['userId ' , 'number ' , 'scene ' => 'other ' ],
24+ ['userId ' , 'number ' , 'on ' => 'other ' ],
2525// ['userId', function($value){ return false;}],
2626 ];
2727 }
Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ public static function inputMulti($type, array $filters=[])
3030 */
3131 public static function trim ($ var )
3232 {
33- return trim ((string )$ var );
33+ return is_array ($ var ) ? array_walk_recursive (function (&$ val ){
34+ $ value = trim ((string )$ val );
35+ }, $ var ) : trim ((string )$ var );
3436 }
3537
3638 /**
@@ -243,4 +245,4 @@ public static function callback($var, $callback)
243245 return filter_var ($ var , FILTER_CALLBACK ,['options ' => $ callback ]);
244246 }
245247
246- }
248+ }
You can’t perform that action at this time.
0 commit comments