Modify ↓
Ticket #2660 (closed bug: invalid)
[validate] range values are read incorrectly from markup
| Reported by: | etal | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.2.4 |
| Component: | unfiled | Version: | 1.2.1 |
| Keywords: | validate | Cc: | |
| Blocking: | Blocked by: |
Description
When assigning ranges (and rangelength) through markup ,for example:
<input id="days" name="days" class="range required" type="text" range="[1,99]" />
the range is interpreted as a string and not an array leading to incorrect validation and inability to submit form.
Attachments
Change History
Changed 5 years ago by etal
-
attachment
jquery.validate.js.patch
added
comment:1 Changed 5 years ago by scott.gonzal
- Status changed from new to closed
- Resolution set to invalid
Setting up validation via attributes is only supported for validation methods that expect strings or numbers as their parameters.
To setup range validation set min and max via attributes and use the autoCreateRanges option.
comment:2 Changed 3 years ago by sadgit
- Status changed from closed to reopened
- Resolution invalid deleted
This is a simple and appropriate fix - why was this rejected?
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

patch to evaluate string if needed