I really did not use the $user->hasError() po cause I use the same validation for both registration and login. However in login po, I only check for the length, not for the uniqueness like in registration