2
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 Type = Physical, I need to pass an Annotation that validates the CPF, otherwise Type = Legal validate the CNPJ
So, as I do an Annotation date, I can access value from another property ?
That is, my Annotation has to take the value that came from the Typopessoa, to validate what is what...
CPF always has 11 digits. CNPJ always has 14. O
TipoPessoa
is not necessary.– Leonel Sanches da Silva
Required in View for mask
– Rod
You can put the field without necessarily mapping it into the database, since the mask is important.
– Leonel Sanches da Silva
Gypsy, in my opinion it is very important to have mapped, even more when we filter by "Type"
– Rod