Modify ↓
Ticket #4135 (closed bug: invalid)
[validate] number validation method fails if first char is decimal
| Reported by: | ryan.rch | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.3.2 |
| Component: | plugin | Version: | 1.3.1 |
| Keywords: | validate plugin | Cc: | |
| Blocking: | Blocked by: |
Change History
comment:2 Changed 4 years ago by dmethvin
- Status changed from new to closed
- Resolution set to invalid
- Description modified (diff)
This is not a jQuery core bug. Please report plugin bugs to the plugin's author, or ask on the jQuery forums. jQuery UI bugs should be reported on the UI bug tracker, http://dev.jqueryui.com .
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.

We're having the same issue. A slightly less intrusive fix for the regex would be to just replace the first one or more repeat matcher with the zero or more one:
original: /-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/
modified: /-?(?:\d*|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/