diff --git a/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua b/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua index 93279c3b..d09b9bb8 100644 --- a/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua +++ b/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua @@ -429,6 +429,23 @@ function Element:__init__(template, kv, ...) self.error = false end +function Element:parse(http) + if not self.datatype then + self.state = M.FORM_VALID + return + end + + return AbstractValue:parse(http) +end + +function Element:validate() + if not self.datatype then + return true + end + + AbstractValue:validate() +end + local Section = class(Node) M.Section = Section