定制 stas-plov/dto-validator-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

stas-plov/dto-validator-bundle

最新稳定版本:v1.1.4

Composer 安装命令:

composer require stas-plov/dto-validator-bundle

包简介

Adds validator for middleware request support in your Symfony application

README 文档

README

Minimum PHP version: 8.2.0 Latest Stable Version Total Downloads Latest Unstable Version License

StasPlovDtoValidatorBundle

About

The StasPlovDtoValidatorBundle Validating the Request by DTO in the context of symfony.

The core idea of StasPlovDtoValidatorBundle is to validate input data in the controller from the Request using so-called DTO (Data Transfer Object) entities.

#[ValidateDto(class: CreateDto::class)]
#[Route(path: '/create/user', name: 'api-user-create', methods: ['POST'])]
public function createUser(CreateDto $createDto): Response {
	// ... some code
}

The $createDto variable will contain all the data described in the corresponding CreateDto class.

Installation

Require the stas-plov/dto-validator-bundle package in your composer.json and update your dependencies:

composer require stas-plov/dto-validator-bundle

Flex, you'll need to enable it manually as explained in the docs.

Usage

See the documentation for usage instructions.

License

Released under the MIT License, see LICENSE.

统计信息

  • 总下载量: 187
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固