I have a TextBox input element that has a RequiredFieldValidator as such:
First name
with RequiredFieldValidator you can not add your custom code.
you should use asp.net customvalidator control, and write your own custom validation javascript function which sets the class to the div.