User Activity

Hello, I created a custom relationship that will display all shared child tickets in different parent tickets. You may refer in the image below for the table related list. In the image there are 3 different parent tickets and they share 3 same child ...
This my onChange Client script that makes the comment field mandatory if correct state is selected.My problem is that if i select state(1,2,4)   the comment field will become mandatory and I select state(3), it wont become mandatory.Could you help me...