validator icon indicating copy to clipboard operation
validator copied to clipboard

sha256 (and sha***) is documented but not supported

Open petitout opened this issue 3 years ago • 2 comments

  • [x] I have looked at the documentation here first?
  • [x] I have looked at the examples provided that may showcase my question here?

Package version eg. v9, v10:

v10

Issue, Question or Enhancement:

sha256 (and sha***) is documented but not supported

Code sample, to showcase or reproduce:

type MyStruct struct {
	Hash string `validate:"sha256"`
}

fails with

Undefined validation function 'sha256' on field 'Hash'

petitout avatar May 13 '22 14:05 petitout

Most of this hash validations where just added a couple of days ago (see https://github.com/go-playground/validator/pull/875). You need to make sure that you point to the latest version of this package in your go.mod.

It will be most likely something like this:

+ require github.com/go-playground/validator/v10 v10.11.0
- require github.com/go-playground/validator/v10 v10.10.0

sdillen avatar May 24 '22 08:05 sdillen

I am not able to reproduce the above error using the most up-to-date version. Is this issue good to close?

jmvbxx avatar Dec 02 '22 13:12 jmvbxx

Closing this as not reproducible.

zemzale avatar Dec 27 '22 14:12 zemzale