Bug Tracker

Ticket #2660 (closed bug: invalid)

Opened 8 months ago

Last modified 8 months ago

[validate] range values are read incorrectly from markup

Reported by: etal Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.2.4 Component: plugin
Version: 1.2.1 Keywords: validate
Cc: Needs: Review

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

jquery.validate.js.patch (482 bytes) - added by etal 8 months ago.
patch to evaluate string if needed

Change History

Changed 8 months ago by etal

patch to evaluate string if needed

Changed 8 months ago by scott.gonzalez

  • 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.

Note: See TracTickets for help on using tickets.