Description
Rejects submissions containing URLs in text and textarea fields. Detects plain URLs (http://, https://, www.), HTML anchor tags, and Markdown-style links to reduce spam without requiring a CAPTCHA.
Usage Notes
- Only applies to fields with input type
textortextarea; other field types are unaffected. - Falls back to the field’s custom error message (
$field->errorMessage) when set; otherwise displays a generic message. - The regex is intentionally broad — legitimate use cases requiring URLs in free-text fields will be blocked.
Resources
Code
Please log in to view this code snippet.