This commit is contained in:
Stefanescu Mihai
2026-03-18 11:40:20 +02:00
parent 0cdf5b7082
commit a4383337f4
69 changed files with 5890 additions and 26 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreWebsiteRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:255'],
'domain' => ['required', 'string', 'max:255', 'regex:/^([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/'],
];
}
public function messages(): array
{
return [
'domain.regex' => 'Please enter a valid domain (e.g. example.com).',
];
}
}