Opened 16 years ago
Closed 16 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)
Change History (4)
Changed 16 years ago by
Attachment: | jquery.validate.js.patch added |
---|
comment:1 Changed 16 years ago by
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 16 years ago by
Owner: | set to joern |
---|
comment:3 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in [4587]. Set jQuery.validator.autoCreateRanges = true to reenable 1.2 style range conversion.
patch to remove the code that causes this