I appreciate the new "show_if" attribute for Fields but I wonder if its 
action could be enhanced by one change...

When I have a form with optional fields, I would like to set a validator on 
the field's value should it be supplied.  I can always set it to 
IS_EMPTY_OR(blah) but this isn't strictly correct for my validation.  I 
want to REQUIRE this validation if the field is displayed, but I want the 
validation IGNORED if the field is not displayed.  In fact, the validation 
should always be ignored if the field is empty, since the user will never 
even see the error if it should fail validation!

This might be as simple as emptying out the "requires" attribute if the 
"show_if" causes the field to be visible.  But I don't change core code -- 
I don't want the hassle of departing from the stock distro of web2py.

Other ideas?

-- Joe

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to