function onChange(control, oldValue, newValue, isLoading) { if (isLoading || newValue == '') { return; } var regexp = /^[0-]{4}-[0-9]{6}-[0-9]{2}$/; if (!regexp.test(newValue)) { 9 alert('Please enter numbers only in XXXX-XXXXXX-XX format'); g_form.setValue('REPLACE WITH YOUR FIELD NAME', ''); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter