jquery-validation v1.1.1 Release Notes

    • πŸ›  Fixed invalid XHTML, preventing error label creation in IE since jQuery 1.1.4
    • πŸ›  Fixed and improved String.format: Global search & replace, better handling of array arguments
    • πŸ›  Fixed cancel-button handling to use validator-object for storing state instead of form element
    • πŸ›  Fixed name selectors to handle "complex" names, eg. containing brackets ("list[]")
    • βž• Added button and disabled elements to exclude from validation
    • 🚚 Moved element event handlers to refresh to be able to add handlers to new elements
    • πŸ›  Fixed email validation to allow long top level domains (eg. ".travel")
    • 🚚 Moved showErrors() from valid() to form()
    • βž• Added validator.size(): returns the number of current errors
    • Call submitHandler with validator as scope for easier access of it's methods, eg. to find error labels using errorsFor(Element)
    • Compatible with jQuery 1.1.x and 1.2.x

    1.1

    • βž• Added validation on blur, keyup and click (for checkboxes and radiobutton). Replaces event-option.
    • πŸ›  Fixed resetForm
    • πŸ›  Fixed custom-methods-demo

    1.0

    • πŸ‘Œ Improved number and numberDE methods to check for correct decimal numbers with delimiters
    • Only elements that have rules are checked (otherwise success-option is applied to all elements)
    • βž• Added creditcard number method (thanks to Brian Klug)
    • βž• Added ignore-option, eg. ignore: "[@type=hidden]", using that expression to exclude elements to validate. Default: none, though submit and reset buttons are always ignored
    • Heavily enhanced Functions-as-messages by providing a flexible String.format helper
    • Accept Functions as messages, providing runtime-custom-messages
    • πŸ›  Fixed exclusion of elements without rules from successList
    • πŸ›  Fixed custom-method-demo, replaced the alert with message displaying the number of errors
    • πŸ›  Fixed form-submit-prevention when using submitHandler
    • 🚚 Completely removed dependency on element IDs, though they are still used (when present) to link error labels to inputs. Achieved by using an array with {name, message, element} instead of an object with id:message pairs for the internal errorList.
    • βž• Added support for specifying simple rules as simple strings, eg. "required" is equivalent to {required: true}
    • βž• Added feature: Add errorClass to invalid fieldοΏ½s parent element, making it easy to style the label/field container or the label for the field.
    • βž• Added feature: focusCleanup - If enabled, removes the errorClass from the invalid elements and hides all errors messages whenever the element is focused.
    • βž• Added success option to show the a field was validated successfully
    • πŸ›  Fixed Opera select-issue (avoiding a attribute-collision)
    • πŸ›  Fixed problems with focussing hidden elements in IE
    • βž• Added feature to skip validation for submit buttons with class "cancel"
    • πŸ›  Fixed potential issues with Google Toolbar by preferring plugin option messages over title attribute
    • submitHandler is only called when an actual submit event was handled, validator.form() returns false only for invalid forms
    • Invalid elements are now focused only on submit or via validator.focusInvalid(), avoiding all trouble with focus-on-blur
    • IE6 error container layout issue is solved
    • Customize error element via errorElement option
    • βž• Added validator.refresh() to find new inputs in the form
    • βž• Added accept validation method, checks file extensions
    • πŸ‘Œ Improved dependency feature by adding two custom expressions: ":blank" to select elements with an empty value and οΏ½:filledοΏ½ to select elements with a value, both excluding whitespace
    • βž• Added a resetForm() method to the validator: Resets each form element (using the form plugin, if available), removes classes on invalid elements and hides all error messages
    • πŸ›  Fixed docs for validator.showErrors()
    • πŸ›  Fixed error label creation to always use html() instead of text(), allowing arbitrary HTML passed in as messages
    • πŸ›  Fixed error label creation to use specified error class
    • βž• Added dependency feature: The requires method accepts both String (jQuery expressions) and Functions as the argument
    • 0️⃣ Heavily improved customizing of error message display: Use normal messages and show/hide an additional container; Completely replace message display with own mechanism (while being able to delegate to the default handler; Customize placing of generated labels (instead of default below-element)
    • πŸ›  Fixed two major bugs in IE (error containers) and Opera (metadata)
    • πŸ‘» Modified validation methods to accept empty fields as valid (exception: of course οΏ½requiredοΏ½ and also οΏ½equalToοΏ½ methods)
    • πŸ“‡ Renamed "min" to "minLength", "max" to "maxLength", "length" to "rangeLength"
    • βž• Added "minValue", "maxValue" and "rangeValue"
    • 0️⃣ Streamlined API for support of different events. The default, submit, can be disabled. If any event is specified, that is applied to each element (instead of the entire form). Combining keyup-validation with submit-validation is now extremely easy to setup
    • βž• Added support for one-message-per-rule when defining messages via plugin settings
    • βž• Added support to wrap metadata in some parent element. Useful when metadata is used for other plugins, too.
    • πŸ”¨ Refactored tests and demos: Less files, better demos
    • πŸ‘Œ Improved documentation: More examples for methods, more reference texts explaining some basics