hyperfk8s/app/Request/Admin/AdminRequest.php

30 lines
563 B
PHP
Executable File

<?php
declare(strict_types=1);
namespace App\Request\Admin;
use Hyperf\Validation\Request\FormRequest;
class AdminRequest 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.
*/
public function rules(): array
{
return [
'username' => 'required|alpha_num|max:32',
'password' => 'required|alpha_num|max:32',
];
}
}