From 457c8a8a526401c503141a184d3e0cdf2643b0f5 Mon Sep 17 00:00:00 2001 From: xAnavrins Date: Sun, 18 Aug 2019 14:53:27 -0400 Subject: [PATCH] Fix forms numeric validation --- sys/modules/opus/ui/components/Form.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/modules/opus/ui/components/Form.lua b/sys/modules/opus/ui/components/Form.lua index 527af3f..ed9ae0d 100644 --- a/sys/modules/opus/ui/components/Form.lua +++ b/sys/modules/opus/ui/components/Form.lua @@ -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'