I think we could remove this code. 'Next' is only enabled if the password is valid! So this is a non-needed double check.