mirror of
https://github.com/Fishwaldo/validator.git
synced 2025-03-15 11:41:32 +00:00
convert to go modules
This commit is contained in:
parent
cd1bd58169
commit
7e57ca0cf5
34 changed files with 114 additions and 137 deletions
29
.travis.yml
Normal file
29
.travis.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
language: go
|
||||
go:
|
||||
- 1.13.4
|
||||
- tip
|
||||
matrix:
|
||||
allow_failures:
|
||||
- go: tip
|
||||
|
||||
notifications:
|
||||
email:
|
||||
recipients: dean.karn@gmail.com
|
||||
on_success: change
|
||||
on_failure: always
|
||||
|
||||
before_install:
|
||||
- go install github.com/mattn/goveralls
|
||||
- mkdir -p $GOPATH/src/gopkg.in
|
||||
- ln -s $GOPATH/src/github.com/$TRAVIS_REPO_SLUG $GOPATH/src/gopkg.in/validator.v9
|
||||
|
||||
# Only clone the most recent commit.
|
||||
git:
|
||||
depth: 1
|
||||
|
||||
script:
|
||||
- go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./...
|
||||
|
||||
after_success: |
|
||||
[ $TRAVIS_GO_VERSION = 1.13.4 ] &&
|
||||
goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN
|
6
Makefile
6
Makefile
|
@ -1,13 +1,13 @@
|
|||
GOCMD=go
|
||||
GOCMD=GO111MODULE=on go
|
||||
|
||||
linters-install:
|
||||
@golangci-lint --version >/dev/null 2>&1 || { \
|
||||
echo "installing linting tools..."; \
|
||||
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.19.1; \
|
||||
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.21.0; \
|
||||
}
|
||||
|
||||
lint: linters-install
|
||||
golangci-lint run
|
||||
$(PWD)/bin/golangci-lint run
|
||||
|
||||
test:
|
||||
$(GOCMD) test -cover -race ./...
|
||||
|
|
24
README.md
24
README.md
|
@ -1,11 +1,11 @@
|
|||
Package validator
|
||||
================
|
||||
<img align="right" src="https://raw.githubusercontent.com/go-playground/validator/v9/logo.png">[](https://gitter.im/go-playground/validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||

|
||||
[](https://semaphoreci.com/joeybloggs/validator)
|
||||
[](https://coveralls.io/github/go-playground/validator?branch=v9)
|
||||

|
||||
[](https://travis-ci.org/go-playground/validator)
|
||||
[](https://coveralls.io/github/go-playground/validator?branch=master)
|
||||
[](https://goreportcard.com/report/github.com/go-playground/validator)
|
||||
[](https://godoc.org/gopkg.in/go-playground/validator.v9)
|
||||
[](https://godoc.org/github.com/go-playground/validator)
|
||||

|
||||
|
||||
Package validator implements value validations for structs and individual fields based on tags.
|
||||
|
@ -20,18 +20,18 @@ It has the following **unique** features:
|
|||
- Alias validation tags, which allows for mapping of several validations to a single tag for easier defining of validations on structs
|
||||
- Extraction of custom defined Field Name e.g. can specify to extract the JSON name while validating and have it available in the resulting FieldError
|
||||
- Customizable i18n aware error messages.
|
||||
- Default validator for the [gin](https://github.com/gin-gonic/gin) web framework; upgrading from v8 to v9 in gin see [here](https://github.com/go-playground/validator/tree/v9/_examples/gin-upgrading-overriding)
|
||||
- Default validator for the [gin](https://github.com/gin-gonic/gin) web framework; upgrading from v8 to v9 in gin see [here](https://github.com/go-playground/validator/tree/master/_examples/gin-upgrading-overriding)
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Use go get.
|
||||
|
||||
go get gopkg.in/go-playground/validator.v9
|
||||
go get github.com/go-playground/validator/v10
|
||||
|
||||
Then import the validator package into your own code.
|
||||
|
||||
import "gopkg.in/go-playground/validator.v9"
|
||||
import "github.com/go-playground/validator/v10"
|
||||
|
||||
Error Return Value
|
||||
-------
|
||||
|
@ -53,14 +53,14 @@ validationErrors := err.(validator.ValidationErrors)
|
|||
Usage and documentation
|
||||
------
|
||||
|
||||
Please see http://godoc.org/gopkg.in/go-playground/validator.v9 for detailed usage docs.
|
||||
Please see http://godoc.org/github.com/go-playground/validator/v10 for detailed usage docs.
|
||||
|
||||
##### Examples:
|
||||
|
||||
- [Simple](https://github.com/go-playground/validator/blob/v9/_examples/simple/main.go)
|
||||
- [Custom Field Types](https://github.com/go-playground/validator/blob/v9/_examples/custom/main.go)
|
||||
- [Struct Level](https://github.com/go-playground/validator/blob/v9/_examples/struct-level/main.go)
|
||||
- [Translations & Custom Errors](https://github.com/go-playground/validator/blob/v9/_examples/translations/main.go)
|
||||
- [Simple](https://github.com/go-playground/validator/blob/master/_examples/simple/main.go)
|
||||
- [Custom Field Types](https://github.com/go-playground/validator/blob/master/_examples/custom/main.go)
|
||||
- [Struct Level](https://github.com/go-playground/validator/blob/master/_examples/struct-level/main.go)
|
||||
- [Translations & Custom Errors](https://github.com/go-playground/validator/blob/master/_examples/translations/main.go)
|
||||
- [Gin upgrade and/or override validator](https://github.com/go-playground/validator/tree/v9/_examples/gin-upgrading-overriding)
|
||||
- [wash - an example application putting it all together](https://github.com/bluesuncorp/wash)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// MyStruct ..
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// DbBackedUser User struct
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// Test ...
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"sync"
|
||||
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
type defaultValidator struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// User contains user information
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// User contains user information
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
|
||||
"github.com/go-playground/locales/en"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
en_translations "gopkg.in/go-playground/validator.v9/translations/en"
|
||||
"github.com/go-playground/validator/v10"
|
||||
en_translations "github.com/go-playground/validator/v10/translations/en"
|
||||
)
|
||||
|
||||
// User contains user information
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
package validator_test
|
||||
|
||||
// import (
|
||||
// "fmt"
|
||||
|
||||
// "gopkg.in/go-playground/validator.v8"
|
||||
// )
|
||||
|
||||
// func ExampleValidate_new() {
|
||||
// config := &validator.Config{TagName: "validate"}
|
||||
|
||||
// validator.New(config)
|
||||
// }
|
||||
|
||||
// func ExampleValidate_field() {
|
||||
// // This should be stored somewhere globally
|
||||
// var validate *validator.Validate
|
||||
|
||||
// config := &validator.Config{TagName: "validate"}
|
||||
|
||||
// validate = validator.New(config)
|
||||
|
||||
// i := 0
|
||||
// errs := validate.Field(i, "gt=1,lte=10")
|
||||
// err := errs.(validator.ValidationErrors)[""]
|
||||
// fmt.Println(err.Field)
|
||||
// fmt.Println(err.Tag)
|
||||
// fmt.Println(err.Kind) // NOTE: Kind and Type can be different i.e. time Kind=struct and Type=time.Time
|
||||
// fmt.Println(err.Type)
|
||||
// fmt.Println(err.Param)
|
||||
// fmt.Println(err.Value)
|
||||
// //Output:
|
||||
// //
|
||||
// //gt
|
||||
// //int
|
||||
// //int
|
||||
// //1
|
||||
// //0
|
||||
// }
|
||||
|
||||
// func ExampleValidate_struct() {
|
||||
// // This should be stored somewhere globally
|
||||
// var validate *validator.Validate
|
||||
|
||||
// config := &validator.Config{TagName: "validate"}
|
||||
|
||||
// validate = validator.New(config)
|
||||
|
||||
// type ContactInformation struct {
|
||||
// Phone string `validate:"required"`
|
||||
// Street string `validate:"required"`
|
||||
// City string `validate:"required"`
|
||||
// }
|
||||
|
||||
// type User struct {
|
||||
// Name string `validate:"required,excludesall=!@#$%^&*()_+-=:;?/0x2C"` // 0x2C = comma (,)
|
||||
// Age int8 `validate:"required,gt=0,lt=150"`
|
||||
// Email string `validate:"email"`
|
||||
// ContactInformation []*ContactInformation
|
||||
// }
|
||||
|
||||
// contactInfo := &ContactInformation{
|
||||
// Street: "26 Here Blvd.",
|
||||
// City: "Paradeso",
|
||||
// }
|
||||
|
||||
// user := &User{
|
||||
// Name: "Joey Bloggs",
|
||||
// Age: 31,
|
||||
// Email: "joeybloggs@gmail.com",
|
||||
// ContactInformation: []*ContactInformation{contactInfo},
|
||||
// }
|
||||
|
||||
// errs := validate.Struct(user)
|
||||
// for _, v := range errs.(validator.ValidationErrors) {
|
||||
// fmt.Println(v.Field) // Phone
|
||||
// fmt.Println(v.Tag) // required
|
||||
// //... and so forth
|
||||
// //Output:
|
||||
// //Phone
|
||||
// //required
|
||||
// }
|
||||
// }
|
10
go.mod
Normal file
10
go.mod
Normal file
|
@ -0,0 +1,10 @@
|
|||
module github.com/go-playground/validator/v10
|
||||
|
||||
go 1.13
|
||||
|
||||
require (
|
||||
github.com/go-playground/assert/v2 v2.0.1
|
||||
github.com/go-playground/locales v0.13.0
|
||||
github.com/go-playground/universal-translator v0.17.0
|
||||
github.com/leodido/go-urn v1.2.0
|
||||
)
|
21
go.sum
Normal file
21
go.sum
Normal file
|
@ -0,0 +1,21 @@
|
|||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
|
||||
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
|
||||
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
|
||||
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
|
||||
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
|
||||
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
@ -4,7 +4,7 @@ import (
|
|||
"reflect"
|
||||
"strings"
|
||||
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// NotBlank is the validation function for validating if the current field
|
||||
|
|
|
@ -3,8 +3,8 @@ package validators
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"gopkg.in/go-playground/assert.v1"
|
||||
"github.com/go-playground/validator/v10"
|
||||
"github.com/go-playground/assert/v2"
|
||||
)
|
||||
|
||||
type test struct {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"github.com/go-playground/locales"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// RegisterDefaultTranslations registers a set of default translations
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
english "github.com/go-playground/locales/en"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
. "gopkg.in/go-playground/assert.v1"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
. "github.com/go-playground/assert/v2"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
func TestTranslations(t *testing.T) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"github.com/go-playground/locales"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// RegisterDefaultTranslations registers a set of default translations
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
french "github.com/go-playground/locales/fr"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
. "gopkg.in/go-playground/assert.v1"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
. "github.com/go-playground/assert/v2"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
func TestTranslations(t *testing.T) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"github.com/go-playground/locales"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// RegisterDefaultTranslations registers a set of default translations
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
indonesia "github.com/go-playground/locales/id"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
. "gopkg.in/go-playground/assert.v1"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
. "github.com/go-playground/assert/v2"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
func TestTranslations(t *testing.T) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"github.com/go-playground/locales"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// RegisterDefaultTranslations registers a set of default translations
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
ja_locale "github.com/go-playground/locales/ja"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
. "gopkg.in/go-playground/assert.v1"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
. "github.com/go-playground/assert/v2"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
func TestTranslations(t *testing.T) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"github.com/go-playground/locales"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// RegisterDefaultTranslations registers a set of default translations
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
english "github.com/go-playground/locales/en"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
. "gopkg.in/go-playground/assert.v1"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
. "github.com/go-playground/assert/v2"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
func TestTranslations(t *testing.T) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"github.com/go-playground/locales"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// RegisterDefaultTranslations registers a set of default translations
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
brazilian_portuguese "github.com/go-playground/locales/pt_BR"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
. "gopkg.in/go-playground/assert.v1"
|
||||
"github.com/go-playground/validator/v10"
|
||||
. "github.com/go-playground/assert/v2"
|
||||
)
|
||||
|
||||
func TestTranslations(t *testing.T) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"github.com/go-playground/locales"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// RegisterDefaultTranslations registers a set of default translations
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
turkish "github.com/go-playground/locales/tr"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
. "gopkg.in/go-playground/assert.v1"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
. "github.com/go-playground/assert/v2"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
func TestTranslations(t *testing.T) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"github.com/go-playground/locales"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// RegisterDefaultTranslations registers a set of default translations
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
zhongwen "github.com/go-playground/locales/zh"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
. "gopkg.in/go-playground/assert.v1"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
. "github.com/go-playground/assert/v2"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
func TestTranslations(t *testing.T) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
"github.com/go-playground/locales"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// RegisterDefaultTranslations registers a set of default translations
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
zhongwen "github.com/go-playground/locales/zh_Hant_TW"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
. "gopkg.in/go-playground/assert.v1"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
. "github.com/go-playground/assert/v2"
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
func TestTranslations(t *testing.T) {
|
||||
|
|
|
@ -18,7 +18,7 @@ import (
|
|||
"github.com/go-playground/locales/fr"
|
||||
"github.com/go-playground/locales/nl"
|
||||
ut "github.com/go-playground/universal-translator"
|
||||
. "gopkg.in/go-playground/assert.v1"
|
||||
. "github.com/go-playground/assert/v2"
|
||||
)
|
||||
|
||||
// NOTES:
|
||||
|
|
Loading…
Add table
Reference in a new issue