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
hightlighted.
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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---