libs/web: introduce recursive expression support for datatypes, introduce "or" and...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 8 Jan 2012 23:33:47 +0000 (23:33 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 8 Jan 2012 23:33:47 +0000 (23:33 +0000)
commit9fcdf0fe81f3c5142b8abd3f701dc3964549742a
tree2d189d22e4686a8aeb55c452221042582d68b95d
parent3812f2908731c6ff5e59aec4e0c899dbff35c469
libs/web: introduce recursive expression support for datatypes, introduce "or" and "and" datatypes
The commit adds a recursive parser for datatype expressions which allows nesting of validators,
this allows for complex expressions like  "list(or(range(0,65535),'infinite'))" to allow a list of
values which are either integers between 0 and 65535 or the literal string "inifinite".
That change also deprecates combined datatypes like "ipaddr" ["or(ip4addr,ip6addr)"] or
"host" ["or(hostname,ip4addr,ip6addr)"]
libs/web/htdocs/luci-static/resources/cbi.js
libs/web/luasrc/cbi.lua
libs/web/luasrc/cbi/datatypes.lua