programmatordev/yet-another-php-validator 问题修复 & 功能扩展

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

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

programmatordev/yet-another-php-validator

最新稳定版本:v1.3.0

Composer 安装命令:

composer require programmatordev/yet-another-php-validator

包简介

PHP validator with expressive error messages

README 文档

README

Latest Version Software License Tests

PHP validator with expressive error messages.

Tip

This library has been archived in favor of the Fluent Validator library. Check it out if you're interested in the same validation style.

Requirements

  • PHP 8.1 or higher.

Installation

Install the library via Composer:

composer require programmatordev/yet-another-php-validator

Basic Usage

Simple usage looks like:

use ProgrammatorDev\Validator\Validator;

// do this:
$validator = Validator::type('int')->greaterThanOrEqual(18);

// and validate with these:
$validator->validate(16); // returns bool: false
$validator->assert(16, 'age'); // throws exception: The age value should be greater than or equal to 18.

Documentation

Contributing

Any form of contribution to improve this library (including requests) will be welcome and appreciated. Make sure to open a pull request or issue.

Acknowledgments

This library is inspired by respect/validation and symfony/validator.

License

This project is licensed under the MIT license. Please see the LICENSE file distributed with this source code for further information regarding copyright and licensing.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-11