I have followed some articles and tutorials over the internet in order to create a custom validation attribute that also supports client-side validation in an asp.net mvc 4
It's worth noting that the [RequiredIf] attribute needs to be added to the second form field in the view model in order for client validation to work.
[RequiredIf]