class Model_User extends RedBean_SimpleModel { ... }
now if a user registers (example) import the fields like you used to,
using R::import and do R::store($user).
Now create a method in your user class called update() :
public function update() {
$this->checkProperties(); //your bean is here: $this->bean
}
Throw an exception and attach a list of fields to the exception (using
the message), or store the list in another property of the class.
RedBean will find the Model_User automatically; this is Fuse.
Cheers,
Gabor
> --
> You received this message because you are subscribed to the Google Groups "redbeanphp" group.
> To post to this group, send email to redbe...@googlegroups.com.
> To unsubscribe from this group, send email to redbeanorm+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redbeanorm?hl=en.
>
>
$bean->getErrors();
Cheers ;)