[Catalyst] Creating a query object?
    Ash Berlin 
    ash at cpan.org
       
    Mon Nov 20 23:23:16 GMT 2006
    
    
  
Josef Karthauser wrote:
> Hey guys,
> 
> I'm using HTML::Widget; I've created a widget and preloaded it
> with values from a database record using ...->value(...).
> I've also set up some constraints, so that the fields can be type
> checked.
> 
> However, I can't get the constraint errors to work.  Well they
> work if I submit a form, set up the widget and use
> 
>     $widget->process($c->req)
> 
> to load the values in.  However when I load the widget from the
> record directly using ->value(...) and then $widget->process(),
> none of the constraints are triggered.
> 
> I'm confused....
> 
> So, I'm trying to hack my way around it by creating a 'query' object
> to use in place of $c->req the first time around.  How do I do that?
> 
> Or, how do I do it properly?
> 
> Help!
> 
> Joe
> 
Firstly there is a HTMLWidget mailing list for this ;)
Using constraints on input from a database doesn't make sense. If the 
data is invalid it shouldn't make it to the database in the first place.
Ash
    
    
More information about the Catalyst
mailing list