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 3216012
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:14:41+00:00 2026-05-17T15:14:41+00:00

I have my own password/login rules that I want to implement such as: Password:

  • 0

I have my own password/login rules that I want to implement such as:

  • Password: At least one number, one lower case character and one upper case character
  • Login: Alphanumeric and between 4 and 15 characters long

etc…

Currently when I do not enter a password and login in my form, I get the following errors (from Authlogic’s default validations):

  • Login is too short (minimum is 3 characters)
  • Password is too short (minimum is 4 characters)
  • Password confirmation is too short (minimum is 4 characters)

These validation rules are not in my model, they come from the Authlogic gem. I know there are configurations that I can add using:

acts_as_authentic do |config|
  config.validate_password_field = false
end

The problem is that I can’t find good documentation for these configurations and when I try the one above so I can use my own, it complains:
undefined method 'password_confirmation' for #<User:0x7f5fac8fe7c0>

Doing this:

acts_as_authentic do |config|
  config.validate_password_field = false

  # added this so it might stop complaining
  config.require_password_confirmation = true
end

Does nothing.

Is there a way to have Authlogic require password confirmation while ignore all other validation so that I can control this?

  • 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-17T15:14:42+00:00Added an answer on May 17, 2026 at 3:14 pm

    The undefined method 'password_confirmation' can be avoided simply by adding this line in your model:

    attr_accessor :password_confirmation
    

    If you want to handle the confirmation yourself, then just add:

    validates_confirmation_of :password
    

    If you dive into the code, you will find this in password.rb:

    if require_password_confirmation
      validates_confirmation_of :password, validates_confirmation_of_password_field_options
      validates_length_of :password_confirmation, validates_length_of_password_confirmation_field_options
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have my own routing rules in routes.php, defined for all the pages that
I have my own password encryption dll that I am using to check the
I want to use two different Spring web contexts , each have own contextConfig,
I have an application that uses multiple user models, each with its own devise
I have a master class: A with a constructor that takes an optional login
I'm using Play 1.2.1. I want to hash my users password. I thought that
I have the following code which check password/login and do other actions: public virtual
I have created 2 extensions for websites that i do not own and they
We have a system that uses a SQL server 2005 database with a number
I want to generate a password reset token for a User model that I

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.