mirror of
https://github.com/kepler155c/opus
synced 2025-09-21 20:24:10 +00:00
Fix forms numeric validation
This commit is contained in:
@@ -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