|
|
|
@ -21,11 +21,17 @@ sub do_create ($c) { |
|
|
|
push @{$c->stash->{errors}}, "You must enter a subdomain." |
|
|
|
push @{$c->stash->{errors}}, "You must enter a subdomain." |
|
|
|
unless $subdomain; |
|
|
|
unless $subdomain; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$subdomain = lc($subdomain); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
push @{$c->stash->{errors}}, "Your subdomain may only contain letters, numbers and hypens." |
|
|
|
|
|
|
|
unless $subdomain =~ /^[a-z0-9-]+$/; |
|
|
|
|
|
|
|
|
|
|
|
} elsif ( $domain_type eq 'owned' ) { |
|
|
|
} elsif ( $domain_type eq 'owned' ) { |
|
|
|
push @{$c->stash->{errors}}, "You must enter a domain." |
|
|
|
push @{$c->stash->{errors}}, "You must enter a domain." |
|
|
|
unless $domain; |
|
|
|
unless $domain; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return if $c->stash->{errors}; |
|
|
|
return if $c->stash->{errors}; |
|
|
|
|
|
|
|
|
|
|
|
$domain = $domain ? $domain : $subdomain . '.' . $c->config->{customer_domain}; |
|
|
|
$domain = $domain ? $domain : $subdomain . '.' . $c->config->{customer_domain}; |
|
|
|
|