Skip to content

Type of string array or slice on minlength, maxlength and length VFun are useless. #2

@billcoding

Description

@billcoding

Go code

type Person struct {
	Name1 []string `validate:"minlength(10,Name1 length must be >= 10)"`
	Name2 []string `validate:"maxlength(10,Name2 length must be <= 10)"`
	Name3 []string `validate:"length(10,Name3 length must be = 10)"`
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions