+local function _uvl_validate_section(node, name)
+ local co = node.map:get()
+
+ luci.uvl.STRICT_UNKNOWN_OPTIONS = false
+ luci.uvl.STRICT_UNKNOWN_SECTIONS = false
+
+ local function tag_fields(e)
+ if e.option and node.fields[e.option] then
+ if node.fields[e.option].error then
+ node.fields[e.option].error[name] = e
+ else
+ node.fields[e.option].error = { [name] = e }
+ end
+ elseif e.childs then
+ for _, c in ipairs(e.childs) do tag_fields(c) end
+ end
+ end
+
+ local function tag_section(e)
+ local s = { }
+ for _, c in ipairs(e.childs) do
+ if c.childs and not c:is(luci.uvl.errors.ERR_DEPENDENCY) then
+ table.insert( s, c.childs[1]:string() )
+ else
+ table.insert( s, c:string() )
+ end
+ end
+ if #s > 0 then
+ if node.error then
+ node.error[name] = s
+ else
+ node.error = { [name] = s }
+ end
+ end
+ end