[Dbix-class] Re: '' != NULL for great sadness
Aaron Schrab
aaron at schrab.com
Thu Jul 9 23:58:36 GMT 2009
At 17:17 -0500 09 Jul 2009, fREW Schmidt <frioux at gmail.com> wrote:
>This is all in javascript. I'm sure I could just use formfu for the
>receiving end, but I've been pretty happy with Data::FormValidator.
It's obviously not all in JavaScript, since you're using DBIC. And
relying completely on JS for data validation is an extremely bad idea.
If you're using Data::FormValidator, it should already handle giving you
undef for fields that were submitted as empty. Normally, it won't even
include those fields in the hash of valid data that it returns, so
trying to get the value of the field out of that hash will default to
undef. If you include the missing_optional_valid option in your call to
it, empty fields will be included in the valid hash, but still with
undef as the value.
More information about the DBIx-Class
mailing list