@@ -114,7 +114,7 @@ public function create(array $data)
114114 // Run validator, throw catchable and displayable exception if it fails.
115115 // Exception includes a JSON result of failed validation rules.
116116 if ($ validator ->fails ()) {
117- throw new DisplayValidationException ($ validator ->errors ());
117+ throw new DisplayValidationException (json_encode ( $ validator ->errors () ));
118118 }
119119
120120 $ user = Models \User::findOrFail ($ data ['user_id ' ]);
@@ -360,7 +360,7 @@ public function updateDetails($id, array $data)
360360 // Run validator, throw catchable and displayable exception if it fails.
361361 // Exception includes a JSON result of failed validation rules.
362362 if ($ validator ->fails ()) {
363- throw new DisplayValidationException ($ validator ->errors ());
363+ throw new DisplayValidationException (json_encode ( $ validator ->errors () ));
364364 }
365365
366366 DB ::beginTransaction ();
@@ -437,7 +437,7 @@ public function updateContainer($id, array $data)
437437 // Run validator, throw catchable and displayable exception if it fails.
438438 // Exception includes a JSON result of failed validation rules.
439439 if ($ validator ->fails ()) {
440- throw new DisplayValidationException ($ validator ->errors ());
440+ throw new DisplayValidationException (json_encode ( $ validator ->errors () ));
441441 }
442442
443443 DB ::beginTransaction ();
@@ -492,7 +492,7 @@ public function changeBuild($id, array $data)
492492 // Run validator, throw catchable and displayable exception if it fails.
493493 // Exception includes a JSON result of failed validation rules.
494494 if ($ validator ->fails ()) {
495- throw new DisplayValidationException ($ validator ->errors ());
495+ throw new DisplayValidationException (json_encode ( $ validator ->errors () ));
496496 }
497497
498498 DB ::beginTransaction ();
0 commit comments