mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 07:00:13 +01:00
domain syntax fix
This commit is contained in:
parent
3be62e18bc
commit
c7a6dd6ed1
@ -106,7 +106,7 @@ class ControllerDomainDomain extends Controller {
|
|||||||
$domains = explode("\n", $this->request->post['domain']);
|
$domains = explode("\n", $this->request->post['domain']);
|
||||||
foreach ($domains as $domain) {
|
foreach ($domains as $domain) {
|
||||||
$domain = rtrim($domain);
|
$domain = rtrim($domain);
|
||||||
if(!preg_match('/^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[A-Za-z]{2,5})$/', $domain) ) {
|
if(!preg_match('/^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[A-Za-z]{2,10})$/', $domain) ) {
|
||||||
$this->error['domain'] = $this->data['text_field_domain'];
|
$this->error['domain'] = $this->data['text_field_domain'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -115,7 +115,7 @@ class ControllerDomainDomain extends Controller {
|
|||||||
if(!isset($this->request->post['mapped']) || strlen($this->request->post['mapped']) < 3) {
|
if(!isset($this->request->post['mapped']) || strlen($this->request->post['mapped']) < 3) {
|
||||||
$this->data['text_field_length'] = str_replace("?",3,$this->data['text_field_length']);
|
$this->data['text_field_length'] = str_replace("?",3,$this->data['text_field_length']);
|
||||||
$this->error['mapped'] = $this->data['text_field_length'];
|
$this->error['mapped'] = $this->data['text_field_length'];
|
||||||
} elseif( !preg_match('/^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[A-Za-z]{2,5})$/', $this->request->post['mapped']) ) {
|
} elseif( !preg_match('/^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[A-Za-z]{2,10})$/', $this->request->post['mapped']) ) {
|
||||||
$this->error['mapped'] = $this->data['text_field_domain'];
|
$this->error['mapped'] = $this->data['text_field_domain'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user