diff --git a/src/SleepingOwl/Admin/Admin.php b/src/SleepingOwl/Admin/Admin.php index 5d89c40e..05708f99 100644 --- a/src/SleepingOwl/Admin/Admin.php +++ b/src/SleepingOwl/Admin/Admin.php @@ -1,5 +1,8 @@ models = new Models; $this->requireBootstrap(); + + $this->registerValidateExceptionHandler(); } /** @@ -139,4 +144,14 @@ public static function menu($model = null) { return new MenuItem($model); } + + /** + * + */ + protected function registerValidateExceptionHandler() + { + App::error(function (ValidationException $e) { + return Redirect::back()->withInput()->withErrors($e->getErrors()); + }); + } } \ No newline at end of file diff --git a/src/docs/08_License.md b/src/docs/08_License.md index 7cfa440c..20fd52f3 100644 --- a/src/docs/08_License.md +++ b/src/docs/08_License.md @@ -1,7 +1,7 @@ ```AsciiDoc The MIT License (MIT) -Copyright 2014 SleepingOwl +Copyright 2014 SleepingOwl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in