I want to restrict the user to only allow letters, numbers and only some characters.
Is there a way to define a mask to allow a specific group of characters?
That is correct. Below is example to implement ClientSideEvents.KeyPress which under English keyboard allows to enter only letters "abcABC". All other entries are not affected.
function Mask1_KeyPress(oEdit, keyCode, oEvent){ var a = 65, z = 90; var A = a + 32, Z = z + 32; var cancel = false; if(keyCode >= a + 3 && keyCode <= z) cancel = true; if(keyCode >= A + 3 && keyCode <= Z) cancel = true; oEvent.cancel = cancel;}
Hi Oscar,