Skip to content

gvalid not supported required-without rule in struct field #2503

Closed
@StrangeYear

Description

@StrangeYear
type Order struct {
   ActorOrder       *ActorOrderReq  `p:"actor_order" v:"required-without:PlaceOrder"`
   PlaceOrder       *PlaceOrderReq  `p:"place_order"  v:"required-without:ActorOrder"`
}

Although I set the value of one field, the other field will still be verified.

problem file: gvalid_validator_check_struct.go

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugIt is confirmed a bug, but don't worry, we'll handle it.doneThis issue is done, which may be release in next version.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions