Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1082 closed defect (fixed)

dojo.validate.isInRange OR dojo.validate.check semi b0rken for numbers

Reported by: jkuhnert@… Owned by: dylan
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: Cc: jkuhnert@…
Blocked By: Blocking:

Description

dojo.validate.check() is definitely awesome, the only problem I've found is that the constraints property of the profile being passed in only supports one contraint.

In the instance I'm referencing I have a textfield that I want to validate as having a number input no greater than 20.0.

If you pass a character string like "aaa" into dojo.validate.isInRange() it will regex away all your string input and say that it is valid.

So....At a minimum it would be nice to have isInRange() do a check to be sure it's a number first, and only then check the range.

Change History (3)

comment:1 Changed 13 years ago by dylan

Owner: changed from anonymous to dylan
Status: newassigned

comment:2 Changed 13 years ago by tk

Resolution: fixed
Status: assignedclosed

r5765 fixes this, by stripping the, from the # so isNaN can function propperly.

comment:3 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.