Validate password input