File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -428,9 +428,13 @@ protected function mutateDate($value)
428428
429429 protected function castAs ($ value , string $ type )
430430 {
431- if (substr ($ type , 0 , 1 ) === '? ' && $ value === null )
431+ if (substr ($ type ,0 , 1 ) === '? ' )
432432 {
433- return null ;
433+ if ($ value === null )
434+ {
435+ return null ;
436+ }
437+ $ type = substr ($ type ,1 );
434438 }
435439
436440 switch ($ type )
Original file line number Diff line number Diff line change @@ -1266,8 +1266,8 @@ public function validate($data): bool
12661266 // the value found in $data, if exists.
12671267 $ rules = $ this ->fillPlaceholders ($ this ->validationRules , $ data );
12681268
1269- $ this ->validation ->setRules ($ rules , $ this ->validationMessages , $ this -> DBGroup );
1270- $ valid = $ this ->validation ->run ($ data );
1269+ $ this ->validation ->setRules ($ rules , $ this ->validationMessages );
1270+ $ valid = $ this ->validation ->run ($ data, null , $ this -> DBGroup );
12711271 }
12721272
12731273 return (bool ) $ valid ;
You can’t perform that action at this time.
0 commit comments