luci-proto-mbim: correctness fixes
authorPaul Donald <redacted>
Fri, 22 May 2026 12:28:16 +0000 (15:28 +0300)
committerPaul Donald <redacted>
Wed, 27 May 2026 12:49:46 +0000 (15:49 +0300)
Signed-off-by: Paul Donald <redacted>
protocols/luci-proto-mbim/htdocs/luci-static/resources/protocol/mbim.js

index 82472a3459f8212b6d06e58cec50d597616009e6..9791f4432859514f69bd3ed343a19a74d6b26add 100644 (file)
@@ -64,6 +64,7 @@ return network.registerProtocol('mbim', {
 
                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');
 
git clone https://git.99rst.org/PROJECT