mirror of
https://github.com/kepler155c/opus
synced 2026-10-28 18:24:31 +00:00
Fix forms numeric validation
This commit is contained in:
1 parent
3512b2441d
commit
457c8a8a52
1 file changed
+1
@@ -100,6 +100,7 @@ function UI.Form:validateField(field)
|
||||
end
|
||||
end
|
||||
if field.validate == 'numeric' then
|
||||
field.value = field.value or ''
|
||||
if #tostring(field.value) > 0 then
|
||||
if not tonumber(field.value) then
|
||||
return false, 'Invalid number'
|
||||
|
||||
Reference in new issue
Block a user