Side navigation
#2660 closed bug (invalid)
Opened April 06, 2008 03:02PM UTC
Closed July 21, 2010 02:39AM UTC
Last modified March 14, 2012 05:37AM UTC
[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: | |
Blocked by: | Blocking: |
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 (1)
Change History (4)
Changed April 07, 2008 06:33PM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
Changed July 19, 2010 09:43AM UTC by comment:2
resolution: | invalid |
---|---|
status: | closed → reopened |
This is a simple and appropriate fix - why was this rejected?
Changed July 19, 2010 09:45AM UTC by comment:3
Simply insert the following line
if (typeof rules === 'string') rules[this] = eval(rules[this]);
Changed July 21, 2010 02:39AM UTC by comment:4
component: | plugin → unfiled |
---|---|
resolution: | → invalid |
status: | reopened → closed |
This is not a jQuery core bug. Please use the plugin's support channel (such as the forums or the plugins page) to request features or report bugs.
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.