Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6752157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:00:42+00:00 2026-05-26T13:00:42+00:00

For the sign-up form for my website I don’t require that users confirm their

  • 0

For the sign-up form for my website I don’t require that users confirm their passwords so there isn’t a password confirmation field.

However when a user resets their password and they click the link in their email and then taken to a change password page I require they confirm their password and provide a field for them to do this.

My question is how can I add password confirmation and min and max lengths for passwords with out it affecting my sign up form because they use they same model. For my signup form I have min and max length validation rules and want these to apply to the change password form but also include password confirmation.

What is the best and most convenient way to do this in your opinion?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T13:00:43+00:00Added an answer on May 26, 2026 at 1:00 pm

    If password confirmation should only be done for users already created, the simplest solution is :

    class User < ActiveRecord::Base
       validates_confirmation_of :password, :unless => :new_record?
    end
    

    So it will only call the validation when setting the value for new users and not for users trying to sign up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .NET powered website, that has a sign-up box form already. I'm
I have a sign in form and a lost password form. Currently in my
I've built a simple sign in POST form that gets submitted via AJAX (default
I'm building a community website where users sign up and create profiles. Now when
In my sign up form for my website, I want to make a tooltip
I'm developing a website with PHP & MySQL where users can sign up. In
I'm designing a database that will be the backend for a marketplace website. There
I have a simple website that calculates grades of college students. There are different
I'm making a website with a page where users can sign up to win
I am creating a form that allows you to sign up for alerts on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.