1
0
mirror of https://github.com/Eising/kipketer.git synced 2024-05-11 05:55:17 +00:00

CHANGED: fixed typo in interface regex preventing the webapp from validation junos interface names. e.g. xe-11/0/0 - NOT, xe-+/0/0 - OK, xe-0/0/1 - OK

This commit is contained in:
Jeni4
2017-02-03 17:28:12 +01:00
parent c85db40d19
commit 1c7e19ce72

View File

@ -18,7 +18,7 @@ $(function() {
});
$(function() {
$.validator.addMethod('InterfaceChecker', function(value) {
var interface = "^(GigabitEthernet([0-9]+\/[0-9]+)|TenGigabitEthernet([0-9]+\/[0-9]+)|TenGigE([0-9]+\/[0-9]+\/[0-9]+\/[0-9]+)|Vlan|Bundle-Ether([0-9]+)|GigabitEthernet([0-9]+\/[0-9]+\/[0-9]+)|GigabitEthernet([0-9]+\/[0-9]+\/[0-9]+\/[0-9]+)|(?:xe|ge)-([0-9+]\/[0-9]+\/[0-9]+))$";
var interface = "^(GigabitEthernet([0-9]+\/[0-9]+)|TenGigabitEthernet([0-9]+\/[0-9]+)|TenGigE([0-9]+\/[0-9]+\/[0-9]+\/[0-9]+)|Vlan|Bundle-Ether([0-9]+)|GigabitEthernet([0-9]+\/[0-9]+\/[0-9]+)|GigabitEthernet([0-9]+\/[0-9]+\/[0-9]+\/[0-9]+)|(?:xe|ge)-([0-9]+\/[0-9]+\/[0-9]+))$";
return value.match(interface);
}, "Invalid Interface");
});