validates_confirmation_of attr... [ options... ] validates_each attr... [ options... ] { |model, attr, value| ... } :if code See discussion on page 406. VALIDATION :unless code See discussion on page 406. Within the User model, you can validate that the two passwords are the same using this: For example, a view might contain the following: Validates one or more attributes using a block. Validates that a field and its doppelgänger have the same content. 401 validates_each Report erratum