diff options
Diffstat (limited to 'protocols/luci-proto-3g')
-rw-r--r-- | protocols/luci-proto-3g/htdocs/luci-static/resources/protocol/3g.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols/luci-proto-3g/htdocs/luci-static/resources/protocol/3g.js b/protocols/luci-proto-3g/htdocs/luci-static/resources/protocol/3g.js index d0d8b4a677..a1c54984a6 100644 --- a/protocols/luci-proto-3g/htdocs/luci-static/resources/protocol/3g.js +++ b/protocols/luci-proto-3g/htdocs/luci-static/resources/protocol/3g.js @@ -94,6 +94,9 @@ return network.registerProtocol('3g', { o = s.taboption('general', form.Value, 'apn', _('APN')); o.validate = function(section_id, value) { + if (value == null || value == '') + return true; + if (!/^[a-zA-Z0-9\-.]*[a-zA-Z0-9]$/.test(value)) return _('Invalid APN provided'); |