diff --git a/contrib/dokku-installer.rb b/contrib/dokku-installer.rb index 8ef81b154..0c7a8e25c 100755 --- a/contrib/dokku-installer.rb +++ b/contrib/dokku-installer.rb @@ -104,7 +104,7 @@ __END__ }); } function update() { - if ($("#vhost").is(":checked") && !isNaN($("#hostname").val()[0])) { + if ($("#vhost").is(":checked") && $("#hostname").val().match(/(\d{1,3}\.){3}\d{1,3}/)) { alert("In order to use virtualhost naming, the hostname must not be an IP but a valid domain name.") $("#vhost").prop('checked', false); }