luci-base: validation.js: fix xgettext quirk
The xgettext utility does not properly discard `/` inside regex character classes, causing a false positive unterminated string error. Avoid the issue by explicitly escaping the embedded slash. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
dd1111407d
commit
b07ac8add8
1 changed files with 1 additions and 1 deletions
|
@ -432,7 +432,7 @@ var ValidatorFactory = baseclass.extend({
|
|||
if (v == '.' || v == '..')
|
||||
return this.assert(false, _('valid network device name, not "." or ".."'));
|
||||
|
||||
return this.assert(v.match(/^[^:/%\s]{1,15}$/), _('valid network device name between 1 and 15 characters not containing ":", "/", "%" or spaces'));
|
||||
return this.assert(v.match(/^[^:\/%\s]{1,15}$/), _('valid network device name between 1 and 15 characters not containing ":", "/", "%" or spaces'));
|
||||
},
|
||||
|
||||
range: function(min, max) {
|
||||
|
|
Loading…
Reference in a new issue