I know I can make some logic based on the columns in the table/model like this:
[RequiredIf("ColumnA == 1", ErrorMessage = "Error message")]
But is it possible to make a required field if I want to make a check against a column in another table/class. Tables/classes are connected through PK/FK. Something like this:
[RequiredIf("DifferentTable.ColumnB == 0"), ErrorMessage = "Error message")]
In Views I can access values from different tables using item.DifferentTable.ColumnB
, is it possible in model and ExpressiveAnnotations
?