This seems like it should be SO simple...
I've got a checkbox and a text field. When the checkbox is checked, the field gets enabled; uncheck it, field gets disabled.
I want the text field to be required only when the box is checked.
What seems to happen is this:
1. Checkbox initially disabled.
2. Check the box; field is enabled.
3. Submit the form.
4. Get validation error (good!)
5. Uncheck the box; field is disabled.
6. Submit the form.
7. STILL get the validation error (NOT GOOD! ...since the field is disabled)
I'm hoping I'm just having a brain-is-ready-for-the-weekend day and there's a simple fix for this. Suggestions?
[Oh, possibly of interest...I'm handling the enable/disable via javascript...here's the
JSF code:
Thanks.