Use check-tld directive for domain validation

This commit is contained in:
Johannes Zellner
2017-02-09 17:25:57 +01:00
parent 586e78dfea
commit 56545b7f41
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
// create main application module
var app = angular.module('Application', ['angular-md5', 'ui-notification', 'ngTld']);
app.controller('SetupDNSController', ['$scope', '$http', 'Client', function ($scope, $http, Client) {
app.controller('SetupDNSController', ['$scope', '$http', 'Client', 'ngTld', function ($scope, $http, Client, ngTld) {
$scope.initialized = false;
$scope.busy = false;
$scope.error = null;

View File

@@ -56,7 +56,7 @@
<h3>Provide the domain for your Cloudron</h3>
<p>Apps will be installed on subdomains of that domain.</p>
<div class="form-group" ng-class="{ 'has-error': dnsCredentialsForm.domain.$dirty && dnsCredentialsForm.domain.$invalid }">
<input type="text" class="form-control" ng-model="dnsCredentials.domain" name="domain" ng-minlength="4" ng-maxlength="128" placeholder="example.com" required autofocus ng-disabled="dnsCredentials.busy">
<input type="text" class="form-control" ng-model="dnsCredentials.domain" name="domain" check-tld placeholder="example.com" required autofocus ng-disabled="dnsCredentials.busy">
</div>
</div>
</div>