Skip to content

Why does requiredIf need at least 2 values? #140

Closed
@budimanjojo

Description

@budimanjojo

I have been scratching my head because requiredIf doesn't work until I looked at the code:

validate/validators.go

Lines 193 to 195 in 9b1446b

if len(kvs) < 2 {
return false
}

What is the reason behind this?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions