Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jquery.validate and tabber.js problems validating  RSS feed

Mike Smith
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I would like to have a message box at the top of the form that keeps track of the number of missing fields. The jquery.validate plugin works fine only for the first tab, the 2nd tab is not doing what I wish. Basically all I want to do is the following:
- have a tabbed form that is validated
- if the form fields are missing I wish to have the number of missing fields displayed in the message box.
- 2nd highlight or have the text "missing" displayed next to the field
- if text is entered into the field or if the check box is checked or radio button selected then update that field and remove the error message

Code snippet:

Just to re-iterate, the number of missing fields which are displayed in the message box (above form) appear to be correct when the form is validated (pressing submit - but missing fields exist). But only those fields on the first tab appear to work. For example, if a field is missing on the first tab it will have an error message displayed where I want it and if I enter in text or select a value, the error message disappears. In addition, the number of errors in the message box decrease in value. In contrast, the 2nd tab will display the error message but when you select something the error message does not disappear, nor does the number of errors in the message box decrease. I figure I need a way to iterate over each tab and validate fields to each specific tab instead of trying to validate the entire form at one time, but I am unsure how this is done using tabber.js and jquery.validate.js plugin.
Any suggestions greatly appreciated...
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!