Validation Plugin giving multiple error messages per field

Validation Plugin giving multiple error messages per field

I am getting multiple error messages when there is an error with a field. Basically every time an event fires that triggers a check, it adds another label element. It also is not removing them when the field is fixed. Is there something simple that I'm missing?

  1. var requirements, messages;
  2. requirements = {
  3.         required: true,
  4.         maxlength: 20
  5.     };
  6.     messages = {
  7.         required: "Required Field",
  8.         maxlengh: "20 Character Limit"
  9.     };
  10. $('form#organization').validate({
  11.         debug: true,
  12.         rules: {
  13.             tagDisplayName: requirements,
  14.             tagDisplayNamePlural: requirements
  15.         },
  16.         messages: {
  17.             tagDisplayName: messages,
  18.             tagDisplayNamePlural: messages
  19.         },
  20.         errorClass: "ui-state-error ui-corner-all"
  21.     });

Also, is there a way to set rules for all fields, or messages for all validation types (such as 'Required Field' for all required fields)? I'm not finding how in the docs, but wouldn't be surprised if I am missing it.


I'm using jQuery 1.3.2 and v1.6 of the validator plug-in.