Yeah, this is what I ended up doing:



function onChange(control, oldValue, newValue, isLoading)


{


      if (newValue.match(/\D+/))


              g_form.setValue('variables.port_number', '');


}