Skip to main content

Bug Tracker

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 scott.gonzal comment:1

resolution: → invalid
status: newclosed

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.

Changed July 19, 2010 09:43AM UTC by sadgit comment:2

resolution: invalid
status: closedreopened

This is a simple and appropriate fix - why was this rejected?

Changed July 19, 2010 09:45AM UTC by sadgit comment:3

Simply insert the following line

if (typeof rules === 'string') rules[this] = eval(rules[this]);

Changed July 21, 2010 02:39AM UTC by dmethvin comment:4

component: pluginunfiled
resolution: → invalid
status: reopenedclosed

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.