Javascript for an event in a field
Good morning,
I've been working on writing a script for an event in a particular field. My goal is to all only is to allow only alphabet letters (capital or lower case). I don't want to limit the number of characters and will make the settings autofit the cell depending on the length of the letters. I don't what characters, symbols or numbers, just letters. Below is the script i've come up with. I put the event script in the "run custom valization script". When i tested i didn't quite get the result I'm looking for. I feel like i'm close but my result is only allowing me one letter. Arbitrary Mask doesn't work because it is limited. Thank you in advance for any input. Here is the script:
if (event.value) {
event.rc = /^[A-Za-z]$/.test(event.value);
}
