Use check-tld directive for domain validation
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user