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