mirror of
https://github.com/LdesignMedia/moodle-availability_ipaddress.git
synced 2026-05-17 05:48:41 +02:00
Add correct builds
This commit is contained in:
@@ -126,6 +126,7 @@ M.availability_ipaddress.validateIpaddress = function(ipaddresses) {
|
||||
for (var i in ipaddresses) {
|
||||
|
||||
// Test normal ip format.
|
||||
// Strict ipv4 check.
|
||||
if (new RegExp(/^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$/gm)
|
||||
.test(ipaddresses[i])) {
|
||||
Y.log('Correct ipv4');
|
||||
|
||||
@@ -122,6 +122,7 @@ M.availability_ipaddress.validateIpaddress = function(ipaddresses) {
|
||||
for (var i in ipaddresses) {
|
||||
|
||||
// Test normal ip format.
|
||||
// Strict ipv4 check.
|
||||
if (new RegExp(/^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$/gm)
|
||||
.test(ipaddresses[i])) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user