I'm having trouble inserting a form where at least one non-required input fields is left blank. Here's the general "flow" of the issue:
I have a simple
Struts application that contains an insert screen that has 10 fields to be inserted into a database. The insert screen (
jsp) is configured to use the DynaValidatorForm where only 5 of the 10 fields are marked "required" in the validator.xml file. All 10 fields are listed in the appropriate form bean in the struts-config.xml file. The validation works as expected when I leave one of the required fields blank. Also, when I fill out ALL the fields in the form, the data is inserted into the database as expected. However, I am not able to insert the form data when at least one of the non-required fields is blank. After clicking the insert button, the request is forwarded to the resource associated with the INPUT parameter of the appropriate action element in the strus-config.xml file. So it's failing validation on some level and I'm not sure how to get around it.
I would assume that DynaValidatorForm would allow blank values for non-required fields, but these blank fields are causing the form to fail validation.
Can someone point me to some resources that will help clarify this for me?
Thanks in advance,
Scott