how to compare two fields in unique validation

how to compare two fields in unique validation.

For Example: one field is date piceker another field is Student name

I want Both filed are compare validation