[Catalyst] Which Form Validation Libs?
Mike Raynham
catalyst at mikeraynham.co.uk
Tue Nov 30 08:24:33 GMT 2010
On 30/11/10 03:34, Eric Berg wrote:
> I see that there are a number of form validation libraries that purport
> to work with Catalyst. I've been using CGI::Formbuilder for years and
> have been relatively happy with it.
>
> I need something for my new Catalyst app. I have already created my
> forms in my TT templates, but I need validation for most of the regular
> stuff, including zip codes, states, credit card info, etc.
>
> You guys got any recommendations?
>
> Thanks.
>
> Eric
I have just started to look at Data::FormValidator:
"Data::FormValidator lets you define profiles which declare the required
and optional fields and any constraints they might have."
You can use the built-in constraints, use existing CPAN modules (e.g.,
Email::Valid), and add your own custom constraints - maybe incorporating
MooseX::Types and MooseX::Types::Structured, as suggested by Darren Duncan.
It doesn't generate form HTML for you, but I prefer to manually create
this anyway.
Regards,
Mike
More information about the Catalyst
mailing list