Bug Tracker

Opened 15 years ago

Closed 14 years ago

#3251 closed bug (invalid)

[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:


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+$)/

Change History (3)

comment:1 Changed 15 years ago by xyrka

Woops didn't wrap my fix in a code block:



My fix:


comment:2 Changed 14 years ago by dmethvin

Owner: set to joern

comment:3 Changed 14 years ago by john

Resolution: invalid
Status: newclosed

Please file plugin bugs with the appropriate author on their bug tracker.

Note: See TracTickets for help on using tickets.