How To Restrict Duplicate Entries In Tabular Inputs

Hi, I am using tabular inputs in my projects i.e. adding more than one records of the same table at once. I am entering three records at a time. But I want that there should be some restrictions on the text fields values that same entries shouldn’t be saved and give an alert.

e.g. I want to add three records of the same student at a time, and in each record I can select the student’s skill from the drop down list. Now I want that once I select the one skill then on the second record that skill shouldn’t be displayed or if displayed then shouldn’t saved and gives error message or alert.

Please remember I am entering 3 records/skills of the student at once.

Thanks in advance.