I have a class with a property which has a range attribution on it.
[Required]
[Range(5, 9999)]
public double Price { get; set; }
Which is respected at all times and on any user input.
But on one specific code path, where i am automating some entries, i want to be able to set the Price to 0. So i want to programmatically tell this model class to ignore this requirement.
Is it possible? If so how?