Email validation : Add 2 email fields that are equal

Email validation : Add 2 email fields that are equal

Hi, not sure it's a good idea but is there a way to have 2 fields that should be equal before proceeding?
EX.  : email : 
confirm your email : 

If the 2 fields doesn't match, user can't send the form.

thanks!