How to add custom validation to your opt-in form
Note: this tutorial is meant for the premium version.
Example 1: only contain numbers
Below is the code to only allow numbers. This can be handy to validate a phone number in a text field.
Take note of the filter id ‘wof-validate-MMERGE3’. Replace MMERGE3 with the ID of your field. The ID can be found in your email list software such as MailChimp.
Example 2: enter a date before January 1, 2018
This advanced example will test that a date entered is before 1 January 2018: