validator:

时间:2021-04-01 10:00:15
【文件属性】:
文件名称:validator:
文件大小:191KB
文件格式:ZIP
更新时间:2021-04-01 10:00:15
validation translation error-handling Go 包验证器 包验证器基于标签对结构和单个字段实现值验证。 它具有以下独特功能: 通过使用验证标签或自定义验证程序进行跨字段和跨结构验证。 切片,阵列和地图潜水,可以验证多维字段的任何或所有级别。 能够深入了解映射键和值以进行验证 通过在验证之前确定其基础类型来处理类型接口。 处理自定义字段类型,例如sql driver Valuer,请参见 别名验证标签,允许将多个验证映射到单个标签,以便更轻松地定义结构上的验证 提取自定义定义的字段名称,例如可以指定在验证时提取JSON名称,并将其在结果FieldError中可用 可自定义的i18n感知错误消息。 Web框架的默认验证器; 从gin中的v8升级到v9的方法请参见 安装 使用go get。 go get github.com/go-playground/validator/v10 然后将验证程序包导入到您自己的代码中。
【文件预览】:
validator-master
----.gitignore(312B)
----field_level.go(5KB)
----go.mod(298B)
----doc.go(33KB)
----Makefile(415B)
----struct_level.go(5KB)
----translations.go(425B)
----LICENSE(1KB)
----baked_in.go(62KB)
----go.sum(3KB)
----cache.go(7KB)
----regexes.go(10KB)
----translations()
--------fr()
--------tr()
--------pt()
--------ru()
--------id()
--------pt_BR()
--------zh_tw()
--------nl()
--------ja()
--------en()
--------es()
--------zh()
----testdata()
--------a.go(17B)
----.github()
--------PULL_REQUEST_TEMPLATE.md(191B)
--------ISSUE_TEMPLATE.md(131B)
--------CONTRIBUTING.md(539B)
--------workflows()
----benchmarks_test.go(20KB)
----country_codes.go(9KB)
----validator.go(11KB)
----README.md(18KB)
----util.go(6KB)
----_examples()
--------dive()
--------translations()
--------custom-validation()
--------struct-level()
--------simple()
--------gin-upgrading-overriding()
--------custom()
----logo.png(13KB)
----non-standard()
--------validators()
----validator_instance.go(21KB)
----validator_test.go(286KB)
----errors.go(7KB)

网友评论