[html-formfu] RFC: automatic constraints from
DBIx::Class column_info
Brian Cassidy
brian.cassidy at nald.ca
Thu May 17 14:21:21 GMT 2007
Carl Franks wrote:
> I've added an experimental new method - constraints_from_dbic() -
> which I'd like feedback on.
> Is this the right way to approach getting auto-constraints for
> database columns, and is the interface any good?
Just off the top of my head, could you not also provide this sort of
thing from the DBIx::Class::FormFu component?
NB: I haven't actually thought that comment out, but our internal
DBIx::Class::FormValidator component that we use here at $work will let
you do this:
$c->model( 'Foo::Bar' )->validator_profile(
constraint_methods => { .... }
# etc...
);
which will merge with a profile generated by the col_info metadata.
-Brian
More information about the HTML-FormFu
mailing list