Bug Tracker

Opened 12 years ago

Closed 12 years ago

#2230 closed bug (fixed)

[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 (502 bytes) - added by Romirez 12 years ago.
patch to remove the code that causes this

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by Romirez

Attachment: jquery.validate.js.patch added

patch to remove the code that causes this

comment:1 Changed 12 years ago by joern

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.

comment:2 Changed 12 years ago by joern

Owner: set to joern

comment:3 Changed 12 years ago by joern

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.