I have my following properties:
public ETipoPessoa TipoPessoa {get;set;}
public string CnpjCPF {get;set;}
public enum ETipoPessoa {
Fisica,
Juridica
}
I have this condition, if TypePerform = Physical, I need to pass an annotation that validates the CPF, otherwise TypePerform = Juridica validates the CNPJ
So, how do I make a date annotation, access value of another property?
That is, my annotation has to get the value that came from the TypePerson, to validate what is what ...