Skip to content

Instantly share code, notes, and snippets.

// Stops people putting in Invalid nameservers
var nameserver = /^((([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z]{2,6})|(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))$/i;
$('#configure_domains_form').submit(function() {
if (validNameserver($('input[name="domainns1"]')) && validNameserver($('input[name="domainns2"]')) && validNameserver($('input[name="domainns3"]')) &&
validNameserver($('input[name="domainns4"]'))){
return true;
}else{
return false;
}
});