I need an attribute in the ASP.NET MVC view model that validates the specified condition (based on a different property value) and enables the on / off option of the visibility of the input control on the edit page.
Something like that:
public string SomeProperty { get; set; } [ConditionalHidden("SomeProperty", "PropertyValueToMakeConditionTrue")] public string DependentProperty { get; set; }
Is it possible?
source share