Skip to content

Releases: go-playground/validator

Release 9.13.0

19 Mar 15:48
8ce234f

Choose a tag to compare

What's New?

Added Brazilian Portuguese translations see PR #350 Thanks @afranioce

Release v9.12.0

05 Mar 15:05
1b8c8e1

Choose a tag to compare

What's new?

  • French translations were added for error messages thanks to @fdelbos's PR

Release 9.11.0

20 Feb 16:22
150fe5b

Choose a tag to compare

What's new?

added a new validation oneof thanks for the PR @ansel1

see details in the PR #343

Release 9.10.0

15 Feb 16:55
535f852

Choose a tag to compare

What's new?

Added new validation hostname_rfc1123 the current hostname validation is for RFC 952

###I want to use the new hostname validation, but don't want to go around and change my struct tags.
No problem, just register an Alias eg.

validate := validator.New()
validate.RegisterAlias("hostname", "hostname_rfc1123")

Release 9.9.4

03 Feb 18:38

Choose a tag to compare

What was fixed?

  • Corrected docs for method name change FieldWithValue => VarWithValue
  • Corrected display of translations when field is relfect.Ptr thanks @glb see #340

Release 9.9.3

14 Jan 22:15
48a433b

Choose a tag to compare

What was fixed?

Update tagCache locking scope to allow for validate.Var and validate.VarCtx to be used from within validations functions. see #335 for details.

Release 9.9.2

06 Jan 03:47
230db62

Choose a tag to compare

What was fixed/updated?

Updated docs to clarify between validation tag separator or , and or validation tag separator |

Release 9.9.1

13 Dec 16:59
b1f51f3

Choose a tag to compare

What was fixed?

There was an issue checking for the end of an or validation block and when 2 consecutive or validation blocks existed, it would not return an error or return an incorrect error.

NOTE: This bug only affected validation with consecutive or validation blocks eg.

validate:"tag1|tag2=,tag3|tag4"

block1 = tag1|tag2=
block2 = tag3|tag4

Thanks for reporting the issue @skryja, see #329 for more details

Release 9.9.0

13 Nov 05:00
61caf9d

Choose a tag to compare

What's new?

Added map key validation support with new keys and endkeys eg.

type Test struct {
  Map map[string]string `validate:"dive,keys,trim,endkeys,trim"`
}

keys must be directly after the dive tag; this was done for efficiency to allow map keys and values to be be handled within the same range.

see docs for more details.

Release 9.8.0

23 Oct 03:07

Choose a tag to compare

What was added?

Added unique validation for ensuring array|slice contain unique values.