Skip to main content

hehey-hvalidation 是一个python 全面的验证器工具类.

Project description

hehey-hvalidation

介绍

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

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

依赖以及版本要求

  • python >= 3.5

安装

  • 直接下载:

  • 命令安装:
pip install hehey-hvalidation

基础文件以目录

参数配置

# 验证器规则参数


# 验证器参数

基本示例

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

  • 多个验证器

  • 验证多个属性

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

  • 设置验证规则错误消息

  • 设置验证器错误消息

  • 设置验证规则使用场景

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

  • 添加自定义验证器

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

  • 直接使用验证器验证

  • 装饰器注册验证器

  • 装饰器注册验证规则

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hehey-hvalidation-1.1.4.tar.gz (13.3 kB view details)

Uploaded Source

File details

Details for the file hehey-hvalidation-1.1.4.tar.gz.

File metadata

  • Download URL: hehey-hvalidation-1.1.4.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for hehey-hvalidation-1.1.4.tar.gz
Algorithm Hash digest
SHA256 9edc8557fb013092290259c4f33370adbec2455c5c6084ad6c222ae624437fd1
MD5 f91aa3be823b60cb58d2c7c516415139
BLAKE2b-256 0e886e5d4ca9fcce14cee83bc630ff9a74e6b0bc0d5caa58146fabcc765aa780

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page