I have a model with some attributes, none of them is required in the model ([Required]) because are used in some forms that are not necessary to be required. The thing is that now I have to do a form using this model where one of its attributes must be required. ¿Is there any way to make this attribute required without change the model class?
Better if is without js too, but if there is no other way... =P
Thanks in advance!
Haven't tested it, but it seems to me it could work.
You could create a base model containing all the fields you need. In a derived model class, you derive the specific property you want to be required, and set the attribute there.