Ticket #1528 (closed defect: fixed)
Unsigned validator does not support float values and validates strings
| Reported by: | hwestphal | Owned by: | jwage |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.0.4 |
| Component: | Validators | Version: | 1.0.0 |
| Severity: | Keywords: | unsigned validator | |
| Cc: | Has Test: | no | |
| Status: | Pending Core Response | Has Patch: | yes |
Description
the current unsigned validator only supports integer values, if you try to validate (float) 5.9 it will return false. the inline documentation says checks if given value is a valid unsigned integer, so this is not really the bug.
the problem is that if you try to validate "five" it would return true ;-)
and because of the general name of this validator one would expect that it supports floats as well :-)
i wrote a patch which supports both int and float values and which does not return true if the value is "five"
Attachments
Change History
Note: See
TracTickets for help on using
tickets.