Fixed custom domain issues
This commit is contained in:
parent
6a0aef864b
commit
32f98d3d18
|
@ -126,7 +126,7 @@ abstract class UserFormRequest extends \Illuminate\Foundation\Http\FormRequest
|
|||
|
||||
// Custom SEO
|
||||
'seo_meta' => 'nullable|array',
|
||||
'custom_domain' => 'sometimes|nullable|regex:/^[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}$/'
|
||||
'custom_domain' => 'sometimes|nullable|regex:/^[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,20}$/'
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class CustomDomainRequest extends FormRequest
|
|||
$domains = collect($value)->filter(function ($domain) {
|
||||
return !empty( trim($domain) );
|
||||
})->each(function($domain) use (&$errors) {
|
||||
if (!preg_match('/^[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,12}$/', $domain)) {
|
||||
if (!preg_match('/^[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,20}$/', $domain)) {
|
||||
$errors[] = 'Invalid domain: ' . $domain;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue