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]
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hvalidation-1.1.3.tar.gz | 18.2 kB | Without provenance | Details for hvalidation-1.1.3.tar.gz |
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
|
Security for hvalidation 1.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.