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

New validation rule sometimes_without #140

Closed
troccoli opened this issue Aug 16, 2020 · 1 comment
Closed

New validation rule sometimes_without #140

troccoli opened this issue Aug 16, 2020 · 1 comment
Assignees
Labels
blocking enhancement unscheduled Issues that have not yet been put in a project

Comments

@troccoli
Copy link
Owner

troccoli commented Aug 16, 2020

Write a new validation rule called sometimes_without which will accept a list of fields, .e.g 'season' => 'sometimes_without:competition,division'.

The rule will fail if the field is present (i.e. can be empty) and any of the fields in the rules is present too.

So in the example, the rule fails if season is present and either competition or division, or both, are present too.

Blocking #141

@troccoli
Copy link
Owner Author

There is now a Laravel rule: prohibits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocking enhancement unscheduled Issues that have not yet been put in a project
Projects
None yet
Development

No branches or pull requests

1 participant