I spent a good amount of time on google and cannot find the answer.
Instead of having an attribute in the model class like
public class MyModel
{
[Required]
public string Name {get; set;}
}
Can I add the Required requirement in the controller instead of attribute?
I am expecting something like ValidationProvider.Add(some model properties, some constraints) Have anyone done that before?