Side navigation
#3251 closed bug (invalid)
Opened August 13, 2008 07:09PM UTC
Closed February 05, 2010 08:35PM UTC
[validate] .1 is considered an invalid number
Reported by: | xyrka | Owned by: | joern |
---|---|---|---|
Priority: | minor | Milestone: | 1.3 |
Component: | plugin | Version: | 1.2.6 |
Keywords: | validate | Cc: | |
Blocked by: | Blocking: |
Description
A number such as .1 or anything that is .(number) comes up as invalid if the number rule is used.
Here is the regex currently used:
/^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)(?:\\.\\d+)?$/
My modified one(probably could be more elegant):
/(^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)(?:\\.\\d+)?$)|(^-?\\.\\d+$)/
Attachments (0)
Change History (3)
Changed August 13, 2008 07:15PM UTC by comment:1
Changed October 13, 2009 12:20AM UTC by comment:2
owner: | → joern |
---|
Changed February 05, 2010 08:35PM UTC by comment:3
resolution: | → invalid |
---|---|
status: | new → closed |
Please file plugin bugs with the appropriate author on their bug tracker.
Woops didn't wrap my fix in a code block:
Current:
My fix: