Re: [dfv] missing_optional_valid ?
Status: Inactive
Brought to you by:
markjugg
|
From: Mark S. <ma...@su...> - 2010-12-09 20:00:40
|
> OK, fair enough. But why do I have to add a 'defaults_regexp_map' in
> order to get my missing optionnals in the 'valid' hash? Shouldn't the
> 'missing_optional_valid' parameter do that? (notify_* are checkboxes)
As the documentation for missing_optional_valid states, it is to cover
"optional fields with empty values". Despite the name, by intent it does
not cover completely missing values. The nature of checkboxes is
related-- unlike a text field a checkbox won't submit anything if it is
not checked. ( Rather than submitting the name with no value, there will
be nothing ).
So, setting defaults in combination with checkboxes is recommended. It's
something I do myself.
Mark
|