Changed blur event to keyup for immediate input validation