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?