BCryptHashes have to be 60 chars in length....

I think what you might be looking for is ..

before :valid?, :check_password_length

def check_password_length
  [false, "Password is to long!"] if @password.length > 6
end

let me know if that works :)

On Aug 18, 10:29 am, joe <[email protected]> wrote:
> If I have a  BCryptHash property, e.g.,
>     property :password,     BCryptHash, :length => 6..8
> then it appears that the length validation is run after the password
> is converted to a hash and always fails. Is there a mechanism for
> doing this?
>
> Thanks.
>
> Joe

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to