hi
i am using a custom validation attribute with IDataErrorInfo
this class is:
[AttributeUsage(AttributeTargets.Property)] public class ValidateAttribute : ValidationAttribute { public bool IsRequired { get; set; } }
and i use in model:
public partial class Product : EntityBase { [ValidateAttribute(IsRequired = true)] public int ProductID { get; set; } [ValidateAttribute(IsRequired = true)] public int ProductName { get; set; } }
how to set or change "IsRequired=false" from view model in wpf for All properties in Product Class?
i like to manualy Disable validation of properties in viewmodel
please help me
thanks