Let's say, I have a form has 4 fields (all mandatory with validation messages): Name, EMail, Address, Phone. And a Submit button. Let's assume I have some test cases as below:
TC1: All fields empty and click Submit -> ValMess = Please enter all mandatory fields
TC2: Fill in all fields but Name -> ValMess = Please enter your Name
TC3: Fill in all fields but Email -> ValMess = Please enter your Email
TC4: Fill in all fields but Address -> ValMess = Please enter your Address
TC5: Fill in all fields but Phone -> ValMess = Please enter your Phone
So when I write automation tests, I just automate TC1 to check validation message. Is it necessary to automate all test cases to check validation messages for all scenarios? Or what is the best way to automate in this case to ensure the correctness?
EDIT: Or in another word: Should we automate all negative test cases? And how is enough? Because if we automate all negative test cases, then there would be a lot of code to be done.