validate_on_update not highlighting fields

I am using the following is a sample validate_on_update action in my model:

validate_on_update   if internet_access == "Y"     if internet_use.blank?       errors.add_to_base("Please describe your internet use.")     end   end end

This successfully throws the validation error if internet access is checked and internet use is left blank, however it does not properly highlight the field that was left blank (in this case "internet_use"). Any suggestions?

When you use add_to_base method, it adds it to the base of the form, not a specific field.

You can add the error to the internet_use field:

errors.add(:internet_use, "Please describe your internet use.")