[Catalyst] HTML::Widget: "All" Constraint and fields containing '0'
Carl Franks
fireartist at gmail.com
Thu Mar 23 17:25:11 CET 2006
Ok, I've fixed this in the svn trunk - version 3711
http://dev.catalyst.perl.org/repos/Catalyst/trunk/HTML-Widget/
Thanks,
Carl
On 23/03/06, Michele Beltrame <mb at italpro.net> wrote:
> Hello!
>
> I noticed a behaviour that might be buggy in HTML::Widget, which I use
> for form validation. I have a constraint such as this:
>
> $w->constraint('All', qw/active username idrole/)->message(
> 'il campo non può essere vuoto'
> );
>
> The "active" comes from the form with either a '0' or a '1' and, if it's
> '1' the costraint check is passed, but if it's '0' is isn't. That is, a
> '0' is treated like an empty string. But it's not an empty string, it's
> a '0'. Is that the right behaviour? If it is, how can I make sure a
> field IS filled in if a zero is a valid field value for me?
>
> Thanks,
> Michele.
>
> --
> Michele Beltrame
> http://www.varlogarthas.net/
> ICQ# 76660101
> Informativa privacy: http://www.italpro.net/em.html
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>
More information about the Catalyst
mailing list