Loading app/Http/Requests/StoreUserRequest.php 0 → 100644 +31 −0 Original line number Diff line number Diff line <?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class StoreUserRequest 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, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> */ public function rules(): array { return [ 'name' => 'required|regex:/\w*$/|string|min:1|max:255', 'username' => 'required|string|regex:/\w*$/|max:255|unique:users,username', 'password' => 'required|regex:/\w*$/|string|min:8|max:255|confirmed', 'dependencia_id' => 'required|min:1|integer', ]; } } Loading
app/Http/Requests/StoreUserRequest.php 0 → 100644 +31 −0 Original line number Diff line number Diff line <?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class StoreUserRequest 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, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> */ public function rules(): array { return [ 'name' => 'required|regex:/\w*$/|string|min:1|max:255', 'username' => 'required|string|regex:/\w*$/|max:255|unique:users,username', 'password' => 'required|regex:/\w*$/|string|min:8|max:255|confirmed', 'dependencia_id' => 'required|min:1|integer', ]; } }