Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is is possible to check if an array is greater then 0 in required_if #1276

Open
2 tasks done
arjendevos opened this issue Jun 5, 2024 · 0 comments
Open
2 tasks done

Comments

@arjendevos
Copy link

  • I have looked at the documentation here first?
  • I have looked at the examples provided that may showcase my question here?

Package version eg. v9, v10:

v10

Issue, Question or Enhancement:

Is it possible to do this?

type ValidationStruct struct {
	FirstArray []string `json:"firstArray" validate:"required_if=secondArray lte=0,dive"`
	SecondArray []string `json:"secondArray" validate:"required_if=firstArray lte=0,dive"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant