This project is archived and is in readonly mode.

#273 ✓ resolved
John Hume

Format messages in validates_format_of

Reported by John Hume | May 29th, 2008 @ 02:45 AM

Error messages from validates_format_of can't currently include the rejected value the way validates_inclusion_of and validates_exclusion_of can. This patch enables that.

The case where we want this is in validating a file attachment based on a name pattern. If the attachment doesn't have a known extension, we render back a file field for each failed upload, but we can't pre-fill file inputs, so we want the message to tell the user which filenames were rejected.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Tickets have moved to Github

The new ticket tracker is available at https://github.com/rails/rails/issues

Shared Ticket Bins

Attachments

Referenced by

Pages