class Model_User extends Orm\Model { $_observers = array('\\Orm\Observer_Validation'); $_properties = array( 'name' => array('validation' => array('required')), 'email' => array('validation' => array('required')) ); }Following the example in the midde of this docs page...
class Controller_User extends Controller { public function action_create () { $user = new Model_User(); $user->name = NULL; $user->email = 'helloworld@gmail.com'; try { $user->save(); } catch (ValidationFailed $e) { echo $e -> getMessage(); } return; } } }If I visit "user/create", all I see is a blank screen. I looked under the hood, and not that I'm a php super-programmer or anything, but it looks like the Orm package is "throwing away" all the goodness of the Fieldset's error messages on line 87 of Fuel/packages/orm/classes/observer/validation.php. The ValidationFailed exception it throws just extends Fuel's base exception which in turn doesn't do anything but extend PHP's native exception. Am I doing something wrong or missing a key configuration option? Should I validate in my controller instead? Thanks for the help!
It looks like you're new here. If you want to get involved, click one of these buttons!