for-15.05 luci-app-firewall: use maxlength datatype for zone name validation
authorHannu Nyman <hannu.nyman@iki.fi>
Sat, 26 Sep 2015 17:33:46 +0000 (20:33 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Sat, 26 Sep 2015 17:35:34 +0000 (20:35 +0300)
commit720f76c5613451b6bec9b18ea2fba18c87c2dc70
tree5226ba8d5dc864be9a2e09ec7d170acc1100c4fe
parent342af521eb06d3ad125eccca03010c533f3de26a
for-15.05 luci-app-firewall: use maxlength datatype for zone name validation

Backport from trunk the zonename validation using
a compound datatype "and(uciname,maxlength(14))"

fw3 sets the maximum length of the zone name to 14 and
ignores zone definitions with too long names.
Add a simple validation to ensure that the new zone name is short enough.

Backport of 34e875b3 and edc58332

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
applications/luci-app-firewall/luasrc/model/cbi/firewall/zone-details.lua