Validation Rules
Overview
Section titled “Overview”Formtress lets you define field-level validation rules for each form. These rules run server-side on every submission — before any integration is triggered.
Submissions that fail validation are flagged as spam but still stored so you can review them.
Adding rules
Section titled “Adding rules”- Open a form in the dashboard.
- Go to the Validation tab.
- Add rules for specific fields.
Rule types
Section titled “Rule types”| Rule | Description | Example |
|---|---|---|
| Required | Field must be present and non-empty. | name is required |
| Block value | Reject submissions where a field matches a specific value or pattern. | Block email containing @spam.com |
| Field type | Validate that a field matches a specific type (e.g., email, URL). | email must be a valid email address |
| Pattern match | Validate against a regex pattern. | phone must match ^\+?[0-9\s-]+$ |
How validation works
Section titled “How validation works”- A submission arrives at the Formtress endpoint.
- Firewall checks (e.g., IP reputation) are performed.
- Domain allowlist is checked first (see Workspaces & Domains).
- Formtress checks various spam signals (e.g., user agent, gibberish content).
- Each field-level rule is evaluated.
- If any rule fails:
- The submission is stored but flagged as spam.
- The response returns
ok: falsewith an error message. - No integrations are triggered.
- If all rules pass:
- The submission is stored as clean.
- All connected integrations fire.