PHPackages                             death\_satan/thinkphp-form-request - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. death\_satan/thinkphp-form-request

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

death\_satan/thinkphp-form-request
==================================

thinkphp6 form request

1.0(4y ago)322MITPHP

Since Aug 14Pushed 4y ago1 watchersCompare

[ Source](https://github.com/zds-s/thinkphp-form-request)[ Packagist](https://packagist.org/packages/death_satan/thinkphp-form-request)[ Docs](https://www.cnblogs.com/death-satan)[ RSS](/packages/death-satan-thinkphp-form-request/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

thinkphp6 FormRequest 扩展
========================

[](#thinkphp6-formrequest-扩展)

参考laravel的[表单验证](https://learnku.com/docs/laravel/8.x/validation/9374#ecf8bc)
-----------------------------------------------------------------------------

[](#参考laravel的表单验证)

\#安装

```
composer require death_satan/thinkphp-form-request -vvv
```

\##创建验证器

---

```
# 执行下面的指令可以生成index应用的Blog表单验证器类库文件
php think make:request index@IndexRequest
# app/index/FormRequest/IndexRequest

#如果是单应用模式，则无需传入应用名
php think make:request IndexRequest
# app/FormRequest/IndexRequest

#如果需要生成多级表单验证器，可以使用
php think make:controller index@test/IndexRequest
# app/index/test/Blog/IndexRequest
```

---

### 默认生成的是一个基础表单验证器,类文件如下

[](#默认生成的是一个基础表单验证器类文件如下)

---

```
