Someone needs help from you.
I need a validation that is as follows.
In my form I have two phone fields, TEL1 and TEL2.
Validation is as follows if TEL2 == TEL1 Gives an alert that the number has already been reported.
Can anyone help me?
JS:
$('[name="telc2"]').change(function () {
ValidacaoTelefone();
});
function ValidacaoTelefone() {
var telefone1 = ('[name="telc1"]').val();
var telefone2 = ('[name="telc2"]').val();
if (telefone2 === telefone1) {
console.log("teste");
}
}