Hello, I have the following code to validate the Venezuelan DNI in the corresponding field of my table in appsheet:
AND(
LEN([Identity_Certificate]) = 10,
FIND(UPPER(MID([Identity_ID],1,1)), "VE") > 0,
FIND(UPPER(MID([Identity_ID],2,1)), "-") > 0,
FIND(UPPER(MID([Identity_ID],3,1)), "0123456789") > 0,
FIND(UPPER(MID([Identity_ID],4,1)), "0123456789") > 0,
FIND(UPPER(MID([Identity_ID],5,1)), "0123456789") > 0,
FIND(UPPER(MID([Identity_ID],6,1)), "0123456789") > 0,
FIND(UPPER(MID([Identity_ID],7,1)), "0123456789") > 0,
FIND(UPPER(MID([Identity_ID],8,1)), "0123456789") > 0,
FIND(UPPER(MID([Identity_ID],9,1)), "0123456789") > 0,
FIND(UPPER(MID([Identity_ID],10,1)), "0123456789") > 0
)
However, the Venezuelan DNI can be variable between 6 to 10 characters, it must start with the letters "V" or "E" followed by a hyphen "-", I can't find a way to do the validation for this variable length structure of the characters.
The above code works perfect but as you can see only for when it has a length of 10 characters, I would really appreciate your support to solve this problem I'm having!
OR(
LEFT([DNI],2)="V-",
LEFT([DNI],2)="E-"
)
Add this to your AND() equation
Simon, 1minManager.com
User | Count |
---|---|
26 | |
25 | |
24 | |
20 | |
20 |