Error on input change: Expression Changed After It Has Been Checked Error [SOLVED]


#1

Hello people, good evening. I’m trying to do the following validation:

  1. Se tipo_pessoa find is PF, enable cpf field and add the required validation for it
    1.2 Disable cnpj field and clear its validation

  2. Se tipo_pessoa field is PJ, enable cnpj field and add the required validation for it
    2.1 Disable npf field and clear its validation

In other hands, i’m getting an error explained in the image. Aparentely the logic is right, but for some reason something is wrong.

Could someone help me in this issue?

See code here

Solution here!


#2

Well, the solution is above.