78a3b1d63d
git commit "Add admin management search sort and permission structure preparation"
41 lines
857 B
PHP
41 lines
857 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Admin\Auth;
|
|
|
|
use Illuminate\Contracts\Validation\ValidationRule;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class LoginPostRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*/
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array<string, ValidationRule|array<mixed>|string>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'username'=>[
|
|
'required',
|
|
'string',
|
|
'min:3',
|
|
'max:50'
|
|
],
|
|
'password'=>[
|
|
'required',
|
|
'string',
|
|
'min:8',
|
|
'max:255'
|
|
]
|
|
];
|
|
}
|
|
}
|