I have a file field in the DB I want to be unique. In my form I have
the user select items from drop-downs and enter text in text boxes, the
file name is then made up of the values in these fields.
I am using validate_presence_of to make sure the user enters info into
all the fields. When a user does not enter info, an error is returned
and the field is highlighted with red.
I am using validate_uniqueness_of :file to ensure the file name is
unique. When it is not unique, an error is returned but no fields are
I want to highlight the fields that comprise the file name. Is there a
way to tell the validation which fields to highlight?
Code examples are always helpful.
Thanks in advance - K