Skip to content

Releases: gookit/validate

v1.2.3

25 Sep 15:37
Compare
Choose a tag to compare
  • update deps
  • update readme
  • add tests on go 1.15
  • fix: custome error not work on use alias name
  • refacting languages register logic

v1.2.1

21 Jun 16:22
Compare
Choose a tag to compare

Release v1.2.1

  • update readme
  • some bugs fixed

Update

  • new: add new method for add bulitin message
  • new: allow setting field map from struct tags, defualt is json
  • new: allow set message from struct tag
  • new: add github actions tests

更新

  • 新增:添加用于添加内置消息的新方法
  • 新增:允许从struct标记设置字段映射,tag默认为 json
  • 新增:允许从struct标记设置错误消息,tag默认为 message
  • 新增:添加github actions测试

v1.2.0

18 Dec 09:35
Compare
Choose a tag to compare

Update

  • Supports setting default values for fields. eg: "required|default:tom"
  • Important: When using filter on a structure, the filtered value will be updated to the structure
  • Added requiredXXX series validators
  • Added stringContains|startsWith|endsWith and other validators
  • Camel-style validator names now have underlined aliases. endsWith can also be written as ends_with
  • Fix some known issues
  • Update README

更新记录

  • 支持设置字段的默认值。eg: "required|default:tom"
  • 重要:结构体上使用 filter 时,将会更新过滤后的值到结构体上
  • 新增 requiredXXX 系列验证器
  • 新增 stringContains|startsWith|endsWith 等验证器
  • 驼峰式的验证器名称现在都添加了下划线式的别名。 endsWith 也可以写为 ends_with
  • 修复一些已知问题
  • 更新README

v1.1.4

17 Dec 10:40
Compare
Choose a tag to compare
  • add requiredXXX validators(thanks @hookover PR #33 )
  • add cnMobile validator
  • update readme

v1.1.3

30 Aug 11:21
Compare
Choose a tag to compare
  • update some logic for file validate
  • optimize message format on validator func has variadic args
  • fix #17 use regex validate will panic
  • add more unit tests
  • update readme

v1.1.2

25 Aug 06:14
Compare
Choose a tag to compare
  • fix: call rule.beforeFunc position is error
  • add more unit tests
  • update readme

v1.1.1

03 Jun 02:42
ac76aac
Compare
Choose a tag to compare
  • Fix panic in custom filter call because at nil variable check.(#13 thanks @d7561985 )
  • Update readme

v1.1.0

21 Apr 16:42
Compare
Choose a tag to compare
  • update: support filter tag on struct
  • add more unit tests

v1.0.3

20 Apr 10:29
Compare
Choose a tag to compare

fix some bugs

  • fix: should use AddMessages() instead AddTranslates() @Git-So
  • fix: check int shold exclude float(bug#7)
  • add some new validate func
  • update readme

v1.0.2

22 Dec 16:32
Compare
Choose a tag to compare

fix bugs