Skip to main content

Bug Tracker

Side navigation

#2230 closed bug (fixed)

Opened January 24, 2008 04:05PM UTC

Closed February 01, 2008 11:32PM UTC

[validate] custom messages are lost when min/max are converted to range

Reported by: Romirez Owned by: joern
Priority: major Milestone: 1.2.3
Component: plugin Version: 1.2.2
Keywords: validate Cc:
Blocked by: Blocking:
Description

The code in the validate 1.2 plugin that converts the minlength and maxlength to rangelength (and min and max to range) ignores the fact that these rules may have error messages associated with them, and defaults to the standard range error message instead of using them.

I'm not quite sure what the purpose of that code is anyway, since minlength and maxlength are sometimes both necessary for the express purpose of having different error messages.

Attachments (1)
  • jquery.validate.js.patch (0.5 KB) - added by Romirez January 24, 2008 04:08PM UTC.

    patch to remove the code that causes this

Change History (3)

Changed January 24, 2008 05:40PM UTC by joern comment:1

The purpose is to merge min/max/length when specified as seperate attributes:

<input min="5" max="7" />

I'll make that an option in the next release, most likely as "autoCreateRanges". Not sure yet about the default, with this ticket it tends to be false.

Changed January 24, 2008 07:40PM UTC by joern comment:2

owner: → joern

Changed February 01, 2008 11:32PM UTC by joern comment:3

resolution: → fixed
status: newclosed

Fixed in [4587]. Set jQuery.validator.autoCreateRanges = true to reenable 1.2 style range conversion.