MODX Community

Formit how to block certain domains

Hi,
My client needs to block certain email domains from being able to fill up a download form.
basically they would like competitors (xxx@competitor-a.com,xxx@competitor-b.com) not to be able to submit.

Is there some hook in formit which can achieve this?
Thank you!

I think you could use a regular expression in the email validation field.

email:email:required:regexp=^/YOUR-REGULAR-EXPRESSION-HERE/^

The regular expression would be something along the line of:

^((?!domain\.com).)*$

Validation in FormIt

works great, thank you!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.