Preview:
//Allow 1 digit from 0 to 5



getFieldById(getFieldChanged()).getValue().toString().find("([^0-5]|{1})") ? getFieldById(getFieldChanged()).setError('Only numeric characters allowed 1 to 5') : getFieldById(getFieldChanged()).clearError();
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