Omkar Mone
Mega Sage

Hi 

Only for characters it would go something like this - 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {

  if (isLoading || newValue == '') {

  return;

  }

  var regexp = /^[a-zA-Z]+$/;

  if(!regexp.test(newValue)) {

  alert('Please enter only characters');

  g_form.setValue('variable name',''); // set variable to empty

  }

}

 

Mark correct answer and close this thread if it helps.

 

Regards,

Omkar Mone