I'm curious as to exactly how dynavalidation works. I've read the chapters on the web (three different books), but they all discuss syntax.
In a program I'm working on, seemingly my server-side validation should work. I have the configuration set in validation.xml, I have struts-config set up correctly, and I'm not using any client side validation.
I know it should work, because I'm using the exact same layout as I did on another page which does work.
Hence, I have a few questions:
1) Can a subtle error somewhere in the code effect the validator somewhere else? Or is each validation unique and individual?
2) Is there anyway I can see, during run-time, exactly what my program is checking during validation?
3) At one time, earlier, I had to use dyna.validatate to force a validation. But now, that's still coming up empty (even though there are obvious errors, like required fields not being present). What could cause this?
4) I'm using validation 1.1, instead of 1.2. Were there any known bugs in 1.1 along these lines?
Edit: I should mention that all my variables in the form-beans are either Strings or ArrayLists. Is there any problems with having the latter?
Any thoughts or suggestions are, of course, more then welcome. [ July 19, 2004: Message edited by: Karl Beowulph ]
Joined: May 31, 2004
Alright, my error has just taken a turn to the odder.
I found out why it's not validating one of my modules, that module keeps trying to use a validation.xml file that's not assigned to it.
Let's say I've got module's A, B, and C. Each module has it's own struts-config file (struts-config-A.xml etc.) and it's own validation (validation-A.xml etc.).
The problem is this. Module B is trying to use validation-C.xml. It's clearly configured in struts-config-B.xml to use validation-B.xml though.
Is this a known bug in struts? Anyone know a workaround?
Joined: May 31, 2004
Alright, I'm pretty sure that Struts will (as of this time) only allow you to configure one validation-rules.xml and validation.xml, each successive configuration simply over-riding the previous.
In essence, that means I'm going to have to have either one massive validation.xml file, or try and assign it to different classes.