Custom Validation

SupportCustom Validation
Cameron JP Staff asked 3 years ago

Hi,
 
I am looking for the best method to add some basic validation for one of my custom fields This is a unique reference that people need to input. I needs to follow the patterm 0NNNNN where N is any digit. (regex = /^0\d{5}$/).
I would like this validation to occur in a similar manner to how the email works where this is checked each time a key has been pressed or on focus out - that shows 2 errors, field is empty, or pattern invalid. Is there some form of callback that I can leverage to do this?
Alternatively, I was thinking of supplying that field as a GET param?
Any thoughts would be appreciated.
Thanks
Cameron
 

1 Answers
Nikola Loncar Staff answered 3 years ago
Hi, have you tried masked field? There you can set format that you need for your customers? Best regards, Nikola