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
on 2007-01-22 20:55
on 2007-01-23 01:11
Hello - anyone know how to do this? Am I explaining myself OK?
on 2007-01-23 19:47
Bump.Is there a way to do this?