Closed tmikaeld closed 12 years ago
Please post a test case to jsfiddle.net so I can see what's really going on in your code. h5Validate does support overrides. It's likely that you're trying to do it wrong.
Instructions in the fiddle: http://jsfiddle.net/aKpha/
Included one of the not working overrides.
Yeah, now that I've had a chance to take a closer look, you're absolutely right. The allValid default setting was contributed code that I did not look at closely enough. The problem is that configuration is stored in the closer that is only available from within the initial call to .h5Validate();
This is fine for most cases, because h5Validate properly stores and passes data through its event handlers. However, since allValid is available as a direct function call, rather than as a triggered event, the bound settings are ignored and a new instance of h5Validate gets created. This is actually true for all of the callable methods. The only one that is instance safe is 'isValid', because it now uses the 'validate' event internally.
Glad you made some sense of my fiddle :-)
Yeah, i'm using isValid per field right now, it's quite cumbersome for a large form though ;-)
I'll have a fix for you, soon. Just have to squeeze it between my already hectic work and book writing schedules. =)
No need to stress Eric, i can manage with this current solution until you have time and lust to do it.
When i'm done with this project, i will try and learn more of jquery and javascript so i can help you.
Thanks for you'r time, really apeciate it.
Fixed in commit 2583d90
Hi,
I'm having trouble overriding the :visible setting, since i need to validate a hidden select element.
Setting a new setting to:
Does not work.
Setting a new setting to:
Does not work.
Changing the default code to:
Works.
A better way to override this without changing the plugin code would be great.