in this case the length of the password is not checked because after hashing length of 64 characters You can enter a blank password, and the condition is satisfied
how to check so as not hashed password is longer than 6 characters
Alexander MatrosovSun Mar 22 19:34:20 -0400 2015
yet solved the problem in this way, but I think it is not very good
function before_save()
{
if ($this->is_new_record() || $this->attribute_was('password')) {
$this->password = password_hash($this->password, PASSWORD_BCRYPT);
}
}
Subject: how to check the length of the password
in this case the length of the password is not checked because after hashing length of 64 characters
You can enter a blank password, and the condition is satisfied
how to check so as not hashed password is longer than 6 characters