I'm using a third party component that I call a method passing a model object and if it finds any error, it will call a callback method passing an array of ValidationResult. What I wanna do is set those errors so that Html.TextBoxFor will render the attribute class="input-validation-error".
At the moment, I decorate my model class with the validation attributes that I need, and if the Name is empty, it works as expected, and make the Name input red, but if the component says it's invalid for any reason, I have a new foreach loop that will print the error messages...
I want to do something inside this callback method that will make my view work just like as if I had decorated my model class with the validation attributes...
Is this possible?