Forum: Ruby on Rails User Registration - Password verification

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ror D. (Guest)
on 2006-06-09 23:57
I have a user model with password; when users register, I want users to
enter password twice (to verify) like in any other normal site; how do I
do this?

thanks
Dark A. (Guest)
on 2006-06-10 00:35
(Received via mailing list)
You might want to check this link:
http://sonjayatandon.com/05-2006/how-to-build-a-se...

While it does go beyond just a simple login it covers a password
confirmation field.

Stuart
Lionel B. (Guest)
on 2006-06-10 01:07
(Received via mailing list)
ror directory wrote the following on 09.06.2006 21:57 :
> I have a user model with password; when users register, I want users to
> enter password twice (to verify) like in any other normal site; how do I
> do this?
>
> thanks
>
>

1/ In your model, use

"validates_confirmation_of :password"

2/ In your view, use

"password_field(:model, :password_confirmation)"

for your password confirmation field.
This topic is locked and can not be replied to.