0

I've used jquery validate to validate a form and submit for processing. All works well and I'm happy with the form.

I decided to add jquery tools to the form to use the dateinput feature. I can get the calendar pick up and works well.

However, I have not set any rules to validate the date text box called "mydate" but when I select any date in the future it immediately comes up with an invalid date, validate is doing something to check the date and not allowing future dates.

I removed validate script from my page and the date input works as expected.

SO there is something automatic in the validation. HOw can I disable validate for this input box (even though I have not set up any rules) or how can I get round this problem

Thank you

HI

The class for the element was 'date', I renamed it to 'mydate' prior to posting question as I assumed validate was picking that up as a date but still got caught.

I have taken the route of dropping jquery tools for now and using the user interface one instead. All working so far so a change of direction required

Thank you

Ray
  • 3,018
  • 8
  • 50
  • 91
  • what css classes does the input have? jQuery validate will attach date validation to anything with the class `date`, for example. Edit: added the full list as an answer. – bhamlin Apr 14 '12 at 22:32
  • jQuery Tools has never impressed me. It requires tons of markup, always out of date with jQuery and very buggy. I'd dump it for something more reliable and compliant. – Sparky Apr 14 '12 at 22:57

1 Answers1

1

Here are the classes that jquery validate will automatically attach valiation to. Avoid using these class names to avoid automatic rules.

classRuleSettings: {
    required: {required: true},
    email: {email: true},
    url: {url: true},
    date: {date: true},
    dateISO: {dateISO: true},
    dateDE: {dateDE: true},
    number: {number: true},
    numberDE: {numberDE: true},
    digits: {digits: true},
    creditcard: {creditcard: true}
}
bhamlin
  • 5,177
  • 1
  • 22
  • 17
  • I did have it as date but changed it before posting question to mydate but problem still occurred – Ray Apr 15 '12 at 07:49