Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Format messages in validates_format_of

#273

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.

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

State: resolved
Milestone: none
Assigned to: nobody
Importance: none