I see one thing I've done wrong above; the arguments to the method
provided to addMethod() should be (value, element) rather than just
(element). Unfortunately having changed this, it's still not working;
rather than getting a silent failure, the validation check is still
being applied to the elem
even aware such
a method existed...?
On Jun 19, 4:22 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> You need to make sure that your custom method checks for optional
> elements. Check those additional methods for
> examples:http://dev.jquery.com/view/trunk/plugins/vali
Alright, I've found the bug with the above code (the callback function
itself doesn't return true or false; only the anonymous method inside
it does), and corrected it. However I've since stumbled upon another
problem; if any field uses a callback method to determine required
status, but *also* ha
Okay, I've refactored my code extensively to use this method instead
(which does make more sense, now that I realise what it's for!)...
unfortunately it still doesn't appear to work. For the purposes of
demonstrating how I'm using it, I've created this test case:
http://www.kapowaz.net/files/cond
I'm currently using the jQuery Validation plugin on a page that needs
to dynamically update the particular rules you validate against
according to which options the user selects (imagine a payment page
which accepts different payment methods; you wouldn't want to validate
against credit card field
On Jun 6, 4:32 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> The latest release has a bug where unhighlight is called whenever
> validating an element, instead of only when the valid-state changed.
> This is fixed in the latest revision, please give that a
> try:http://dev.jquery.com/view/t
I'm trying to specify a couple of custom methods for highlighting/
unhighlighting valid/invalid fields on my form, but I'm getting some
strange behaviour, which I'm not sure is due to me misunderstanding
how these methods are supposed to be implemented, or if it's just
buggy.
My custom methods lo
On Jun 5, 5:29 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> I've added a short explanation and an example
> here:http://docs.jquery.com/Plugins/Validation#Validating_multiple_fields_...
Excellent, thanks! I'll give that a go.
I'm trying to create a custom validation rule which works based on a
pair of form fields (specifically, two select elements representing
month and year, which must be a date in the future). I couldn't see
any examples of this pattern in use, and wanted to ask if it was even
possible? How might one
Right, after further investigation I believe that the problem is
deeper than simply a bug with validate (I don't think there is one;
it's just not designed to do what I'm attempting). So I figured I'd
write up some more of my thoughts about what I'd like to do.
Essentially, for a given form, I wan
I've created a new ticket (http://dev.jquery.com/ticket/2359) with a
patch for a quirky bug I've discovered, which may or may not be a bug
in the .show() method of jQuery itself, or perhaps just a bug within
the validation plugin.
The problem is manifest when error messages are configured to be
d
I'm trying to write a custom view for a form which allows the
condition of the form to be represented independently of error
messages, by updating the class on another element accordingly
whenever the form is changed. So, I have the following code:
$('#myform').change(function()
{
switch
Excellent! That works nicely. The method names might benefit from
being a bit more obvious (and documented on docs.jquery.com?) though.
Pass and Fail come to mind.
I'm looking to modify the markup surrounding my form elements once
validation has taken place so as to indicate success/failure with a
particular input element's contents, and I'm wondering if the Validate
plugin can do this without any modification? To give an example,
imagine I have the followin
14 matches
Mail list logo