diff options
Diffstat (limited to 'libs/web')
-rw-r--r-- | libs/web/luasrc/view/cbi/dynlist.htm | 2 | ||||
-rw-r--r-- | libs/web/luasrc/view/cbi/value.htm | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libs/web/luasrc/view/cbi/dynlist.htm b/libs/web/luasrc/view/cbi/dynlist.htm index 387299dec..5f57941b8 100644 --- a/libs/web/luasrc/view/cbi/dynlist.htm +++ b/libs/web/luasrc/view/cbi/dynlist.htm @@ -39,7 +39,7 @@ cbi_dynlist_init('<%=cbid%>'); <%- end -%>', '<%: -- custom -- %>'); <% end -%> <% for i=1, #vals + 1 do -%> - cbi_validate_field('<%=cbid%>.<%=i%>', <%=tostring(self.optional == true or i > #vals)%>, '<%=self.datatype%>'); + cbi_validate_field('<%=cbid%>.<%=i%>', <%=tostring((self.optional or self.rmempty) == true or i > #vals)%>, '<%=self.datatype%>'); <%- end %> <% end -%> </script> diff --git a/libs/web/luasrc/view/cbi/value.htm b/libs/web/luasrc/view/cbi/value.htm index 84daafd46..d94863e90 100644 --- a/libs/web/luasrc/view/cbi/value.htm +++ b/libs/web/luasrc/view/cbi/value.htm @@ -40,7 +40,7 @@ $Id$ <%- end -%>'); <%- end %> <% if self.datatype then -%> - cbi_validate_field('<%=cbid%>', <%=tostring(self.optional == true)%>, '<%=self.datatype%>'); + cbi_validate_field('<%=cbid%>', <%=tostring((self.optional or self.rmempty) == true)%>, '<%=self.datatype%>'); <%- end %> </script> <% end -%> |