1

My requirement is - To compare if 2 email address are different (comparing case as well. if different then to proceed. if same, then to get an error.

tom.smith@gmail.com & Tom.Smith@gmail.com = Same - error should be received.

I am trying to achieve this through javascript. When I match the email addresses as equal even the case (upper/lower) is being considered. But if am trying to check on not equal, the code is not checking the case and no error is appearing.

Code -

if ((context.Email1.value) !== (context.Email2.value)) { 
    return true; 
} else { 
    return false; 
}

Please advice.

Regards, PS

Guruprasad J Rao
  • 29,410
  • 14
  • 101
  • 200

1 Answers1

0
return context.Email1.value.toLowerCase() === context.Email2.value.toLowerCase();
Meghan
  • 1,215
  • 11
  • 17