How do I create an if statement alert for a dropdown where the validation is: must be 12 characters and start with 25, 35, or 45?
This is what I have so far however I do not know how to get the 35 and 45 in the statement.
I am using Adobe Pro XI. This is my first time adding scripts to document for validation.
event.rc = true;
if (event.value.length != 12 && event.value != 'Must be 12 digits Select Prefix and enter Account number behind. cheq - 25 ushceq - 35 plan 24 - 45') {
app.alert("The entered value must be 12 characters long and start with prefix cheq '25' or uscheq '35' or plan 24 '45'!");
event.rc = false;
}
var n = event.value.indexOf("25");
if (n == -1) { // substring not found
app.alert("The entered value must be 12 characters long and start with prefix cheq '25' or uscheq '35' or plan 24 '45'");
event.rc = false;
}
else {
event.rc = true;
