You've already forked Atomcms-edit
75b78c17fa
- Fix timing attack vulnerability in AuthController - Split web.php (316 lines) into 7 focused route files - Add 8 API Resources for consistent response formatting - Add 8 FormRequest classes for centralized validation - Use Resources instead of manual array mapping in controllers
27 lines
584 B
PHP
Executable File
27 lines
584 B
PHP
Executable File
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\Api;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class RegisterRequest extends FormRequest
|
|
{
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'username' => ['required', 'string', 'max:50'],
|
|
'password' => ['required', 'string', 'min:6'],
|
|
'mail' => ['required', 'email', 'max:255'],
|
|
'look' => ['nullable', 'string'],
|
|
'motto' => ['nullable', 'string', 'max:100'],
|
|
];
|
|
}
|
|
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
}
|