diff options
Diffstat (limited to 'protocols/luci-proto-ncm/htdocs/luci-static/resources/protocol/ncm.js')
-rw-r--r-- | protocols/luci-proto-ncm/htdocs/luci-static/resources/protocol/ncm.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols/luci-proto-ncm/htdocs/luci-static/resources/protocol/ncm.js b/protocols/luci-proto-ncm/htdocs/luci-static/resources/protocol/ncm.js index 4d2f446793..95b5297811 100644 --- a/protocols/luci-proto-ncm/htdocs/luci-static/resources/protocol/ncm.js +++ b/protocols/luci-proto-ncm/htdocs/luci-static/resources/protocol/ncm.js @@ -86,6 +86,9 @@ return network.registerProtocol('ncm', { 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'); |