script to find a character in text field and see if it is not repeated
I have text field say TEXT1 which can type anything from numbers to strings to special character.
My requirement is what if i want some specific character to be input only once.
for example if want that user can use the character "a" (not case sensitive) only once.
i used the following script but didnot work
if(!this.getField("TEXT1").contains("a")){
this.getField("TEXT1").value = this.getField("TEXT1").valueAsString + "a";
}
