Validating “birthday” fields

The plugin uses HTML5 input fields and will by default use a regular "text" field for fields marked as "birthday" fields in MailChimp.

If you want to enforce a format on your visitors, we suggest using the following HTML which will force your visitors to enter a valid MM/DD date.

The important part is the added pattern=".." attribute.

<input type="text" name="BIRTHDAY" placeholder="MM/DD" pattern="(0[1-9]|1[012]).(0[1-9]|1[0-9]|2[0-9]|3[01])" />

Please make sure to change "BIRTHDAY" in the example to the actual name of your MailChimp list field.

Was this article helpful? ·