stas-plov/dto-validator-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱: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.

统计信息

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

GitHub 信息

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

其他信息

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