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.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

Nested validations

#552

Rails 2.1 lacks support for easy nested validations so that multiple validations on the same field dont all show up at once.

It would be nice to have something like this for example.

validates_presence_of :username do

validates_format_of :username, :with => /[A-Za-z0-9]+/ do

validates_uniqueness_of :username, :case_sensitive => false

end

end

In this case, uniqueness would only be run if format validates, which would only be run if username is present.

Reported by k776 · July 5th, 2008 @ 10:30 PM

State: wontfix
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Rob Dupuis
  2. josh
    josh
    • State changed from new to wontfix

    November 22nd, 2008 @ 06:39 PM