What I need is a way to conditionally validate fields depending on if other fields are filled in.
Ex. I have a dropdown and a date field that are related. If none of the fields are set then the form should pass validation. However, if one of the two fields are set but the other isn’t then the validation should fire, requiring the other field to be set.
I have written custom validation classes but it seems that it is validates on single fields. Is there a way to set up the validation that I need using the built in validators? If not, Is there a good way to connect two fields using a custom validator?
Fluent validation supports conditional validation, just use the When clause to check the value of the secondary field:
https://docs.fluentvalidation.net/en/latest/conditions.html
You may also be able to use the .SetValidator operation to define a custom validator that operates on the NotEmpty condition.