Comparing subform data when subform has multiple elements property checked

I have a subform which stores it’s data in a single element and allows multiple elements to be stored.I e. Subform variable becomes a list.Now i want to ensure that no 2 subform have the same data in them.

Eg. I have a subform which contains name and age and i have this data to be filled for 5 students
I fill in the data for 1st student with name= Tom and age = 10
When i add using the add button on the subform i should be allowed to enter values of name as anything except Tom , i need to apply a custom validation expression.
How to write this expression in such a case