【发布时间】:2011-02-10 02:58:19
【问题描述】:
有没有办法使用 restful_authentication 更改密码的最小长度?目前是 6 个字符,我需要另一个值。
我试过像这样在 Authentication::ByPassword 之前和之后调用 validates_length_of
validates_length_of :password, :within => 4..40, :if => :password_required?
include Authentication::ByPassword
像这样:
include Authentication::ByPassword
validates_length_of :password, :within => 4..40, :if => :password_required?
但最小密码仍为 6。
【问题讨论】:
标签: ruby-on-rails ruby restful-authentication