Google Groups

Re: validation when setting a column value


John Ingram Mar 23, 2009 2:09 PM
Posted in group: Rose::DB::Object
init_error_mode is 'fatal' by default.  You can set it to 'return' in
a Rose::DB::Object::Metadata subclass:

sub init_error_mode { 'return' }

John

On Mon, Mar 23, 2009 at 4:05 PM, dstroma <dst...@gmail.com> wrote:
>
> Hi,
>
> Currently when I create an instance of a Rose::DB::Object and set a
> column value, it validates it and throws an exception immediately if
> the value is invalid. Is there a way to only validate on save or
> otherwise explicity? This behavior complicates my app because I was
> planning on having my controllers create new objects with raw form
> input as column values, with validation occuring in my models (RDBO
> subclasses). With the current behavior I need validation in two places.
> >
>