2009/3/13 Ian Wells <i...@cack.org.uk>: > In my edit function in a Catalyst controller, I have: > > sub edit :Local :FormConfig :Args(1) { > > [...] > > $form->constraints_from_dbic($table); > > if ($form->submitted_and_valid) { > $form->model->update($row); > > But the DB crashes out with an overly-long string - which it > shouldn't, since the form should trap that and report it. T > > he constraints are created in the form datastructure, but FormFu > hasn't spotted the length violation. Should I be setting them earlier > or something?
You need to call $form->process() after constraints_from_dbic() submitted_and_valid() only reports the result of the last process() - which was called by Catalyst-Controller-HTML-FormFu, before you'd added the constraints. Carl _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu