- if self.error then
- self.error[section] = "invalid"
- else
- self.error = { [section] = "invalid" }
- end
- if self.section.error then
- table.insert(self.section.error[section], "invalid")
- else
- self.section.error = {[section] = {"invalid"}}
- end
+ val_err = val_err or "invalid"
+
+ self.error = self.error or { }
+ self.error[section] = val_err
+
+ self.section.error = self.section.error or { }
+ self.section.error[section] = self.section.error[section] or { }
+ table.insert(self.section.error[section], val_err)
+