manzowa/manzowa-validator 问题修复 & 功能扩展

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

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

manzowa/manzowa-validator

最新稳定版本:v1.0.4

Composer 安装命令:

composer require manzowa/manzowa-validator

包简介

Manzowa\Validator is a very small libray PHP

关键字:

README 文档

README

monzowa\manzowa-validator (Version: 0.0.1)

manzowa\manzowa-validator is a very small validation library, with the easiest and most usable API we could possibly create. Source Code Latest Version Software License

Functions

Function Description
errors() Get errors.
failed() boolean.
isEmail() It allows you to check if the e-mail address entered is valid
isEmpty() It allows you to check if the field is empty
isNumber() It is used to check if the type of the value entered is number
method() boolean.
resuts() Get results.
same(string $name = "") It allows you to compare the value of two fields.
size(int $digit = 8) It allows you to check the size of the entered value.
validate(array $filters = [], string $verbe = "post") ?.
<?php 
    $validator = new Monzowa\Validator\Validator;

    if ($validator->method()) {
        $validator->validate(
            [
                "numero" => function () {
                    Validator::isEmpty()->isNumber()->get();
                },
                "code" => function () {
                    Validator::isEmpty()->isNumber()->size(4)->get();
                },
                "email" => function () {
                    Validator::isEmpty()->get();
                },
                "confirm_email" =>  function () {
                    Validator::isEmpty()->same("email")->get();
                },
                "password" => function () {
                    Validator::isEmpty()->get();
                },
                "confirm_password" => function () {
                    Validator::isEmpty()->get();
                }
            ]
        );
        if ($validator->failed()) {
            echo "<pre>";
            print_r($validator->errors());
            echo "</pre>";
        } else {
            echo "<pre>";
            print_r($validator->results());
            echo "</pre>";
        }
    }
?>

The simplest validation engine: - https://www.manzowa.com/validation

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-04