Fix unit test for checking form validity if required fields are empty