I have Separate as SECTION 01 and 02 just for explanation.
i.In SECTION 01 If type any symbol or space between username, should show "INVALID USERNAME PLEASE TRY AGAIN" before proceeding to password.
ii. If Password Typed, should check for Password Policy before proceeding to SECTION 02.