mirror of
https://github.com/openwrt/luci.git
synced 2025-12-21 19:14:34 +04:00
luci-base: add a validation for fw4 zone names
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
@@ -457,6 +457,10 @@ const ValidatorFactory = baseclass.extend({
|
|||||||
return this.assert(this.value.match(/^[a-zA-Z0-9_]+$/), _('valid UCI identifier'));
|
return this.assert(this.value.match(/^[a-zA-Z0-9_]+$/), _('valid UCI identifier'));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
ucifw4zonename() {
|
||||||
|
return this.assert(this.value.match(/^[a-zA-Z_][a-zA-Z0-9_]+$/), _('valid fw4 zone name UCI identifier'));
|
||||||
|
},
|
||||||
|
|
||||||
netdevname() {
|
netdevname() {
|
||||||
const v = this.value;
|
const v = this.value;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user