You can use this as 'validate' script of same field:
var state = ["AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"];
if(event.value){
var check = state.indexOf(event.value) > -1;
if(!check){
app.alert("Please enter correct US State abbreviation.");
event.rc = false;}}
Dear Nesa Nurani
Thank you soooo much for your help. With your suggestion, and a little modifying on my part, I came up with this, which I LOVE !!! Please try it out and feel free to share it with others.
I copied and pasted it into MS Word and added TAB marks to separate the columns. The TAB marks aren't showing in this copy, so I replaced all of the TAB marks with "@".
Thanks again, John.
var state = ["AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"];
if(event.value){
var check = state.indexOf(event.value) > -1;
if(!check){
app.alert("Please enter correct US State abbreviation. \n \n
Alabama - AL@@Kentucky - KY@@North Dakota - ND\nAlaska - AK@@Louisiana - LA@@Ohio - OH\nArizona - AZ@@Maine - ME@@Oklahoma - OK\nArkansas - AR@@Maryland - MD@@Oregon - OR\nCalifornia - CA@@Massachusetts - MA@@Pennsylvania - PA\nColorado - CO@@Michigan - MI@@Rhode Island - RI\nConnecticut - CT@@Minnesota - MN@@South Carolina - SC\nDelaware - DE@@Mississippi - MS@@South Dakota - SD\nDistrict of Columbia - DC@Missouri - MO@@Tennessee - TN\nFlorida - FL@@Montana - MT@@Texas - TX\nGeorgia - GA@@Nebraska - NE@@Utah - UT\nHawaii - HI@@Nevada - NV@@Vermont - VT\nIdaho - ID@@@New Hampshire – NH@Virginia - VA\nIllinois - IL@@@New Jersey - NJ@@Washington - WA\nIndiana - IN@@New Mexico - NM@@West Virgini - WV\nIowa - IA@@@New York - NY@@Wisconsin - WI\nKansas - KS@@North Carolina - NC@@Wyoming - WY\n
");
event.rc = false;}}
