Skip to main content

hehey-hvalidation

介绍

hehey-hvalidation 是一个python 全面的验证器工具类. 其主要特点有:

  • 支持常用验证器
  • 验证器易扩展
  • 支持验证字典以及对象属性
  • 示例全面

依赖以及版本要求

  • python >= 3.5

安装

  • 直接下载:

  • 命令安装:
pip install hehey-hvalidation

基础文件以目录

参数配置

# 验证器规则参数


# 验证器参数

基本示例

  • 快速使用
from 
  • 接入hehey 组件

  • 多个验证器

  • 验证多个属性

  • 多个验证器支持与或 or,and,&,|

  • 设置验证规则错误消息

  • 设置验证器错误消息

  • 设置验证规则使用场景

  • 设置验证规则的前置条件

  • 添加自定义验证器

  • 验证器直接为方法或函数

  • 直接使用验证器验证

  • 装饰器注册验证器

  • 装饰器注册验证规则

  • 默认验证器 验证器 | 说明 | 基础示例 ----------|-------------|------------ required | 要求此字段/属性是必须的(不为空的)。关于为空 | ['tagId, userId', 'required' ] int/integer | 验证是否是 int 支持范围检查 | ['userId', 'int'] ['userId', 'int', 'min'=>4, 'max'=>16]

Release files for hvalidation 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hvalidation 1.1.3
File Size Uploaded
hvalidation-1.1.3.tar.gz 18.2 kB Details

Release files / hvalidation-1.1.3.tar.gz

Download URL hvalidation-1.1.3.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
afde7c2686422b689afbf8845ed8e03f14b944a9b2cd2c2e9b069a45179319e5
BLAKE2b-256 checksum
How to use checksums
5ebed27d548cde78bd2b7910f5aa09246340a78ffd2d0ef764fa2601b2f808b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/20.7.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.8

Release history Release notifications | RSS feed

This release

1.1.3 This release

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page