Hi guys,
Just wondering if the validation class offers the functionality to have at least one of 2 fields required?
Practical example would be to have a name field and an email field, and requiring the user to fill in at least one:
- only name is correct
- only email is correct
- both name and email is correct
- when both aren't supplied it would result in an error.
Or should this be done in a Validation extension? Then the follow-up question: what's the desired way to do this check, as the example in the Docs demonstrates that the validation function only receives the value of the current field we're validating.
Thanks in advance!