Thanks to visit codestin.com
Credit goes to github.com

Skip to content

can not validate uuid field #280

@agrozyme

Description

@agrozyme

System (please complete the following information):

  • OS: linux
  • GO Version: 1.23
  • Pkg Version: 1.5.3

Describe the bug

When struct has uuid field, run validate.New to get panic "reflect: call of reflect.Value.IsNil on array Value"

To Reproduce

package main

import (
	"fmt"

	"github.com/google/uuid"
	"github.com/gookit/validate"
)

type Test struct {
	ID uuid.UUID
}

func main() {
	data := Test{}
	_ = validate.New(data).ValidateErr()
	fmt.Println("OK")
}

Expected behavior

show "OK"

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions