Commit 31c9fdd
Fix case when "long" type validation allows field to have a "string" type
Since 23be848 (Validate/long: final rewrite) "long" type
validation started to handle string representation of numbers.
This happens because "tonumber" function implicitly casts some
strings to numbers. That allows to pass strings (e.g. "123") instead
of "long".
This patch fixes such behaviour and introduces corresponding
test. Currently we will try to cast to number only fields that
have "number" or "cdata" type.
Closes #1331 parent 3b2d264 commit 31c9fdd
2 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
772 | 772 | | |
773 | 773 | | |
774 | 774 | | |
775 | | - | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
776 | 779 | | |
777 | 780 | | |
778 | 781 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
136 | 142 | | |
137 | 143 | | |
138 | 144 | | |
| |||
0 commit comments