Validation
JoomForms checks the answers on the server when the form is sent. If something is wrong, the form comes back with the error message at the top and each wrong field marked.
Field settings
On the Validations sub-tab of a field:
| Setting | Meaning |
|---|---|
| Required | The field must be filled in. |
| Validation Rule | The rule the value must follow (list below). |
| Multiple Validation Rules | Several rules at once, used with the Multiple Rules rule. |
| Extra Accepted Characters | Characters allowed on top of the rule, for example a space with Letters. With Regex it becomes Regex Syntax, with Same Value as Other Field it becomes Field Name To Compare With. |
| Validation Message | The text shown when the value is wrong. Default Invalid Input. |
Validation rules
| Rule | Accepts |
|---|---|
| No Validation | Anything. |
| Letters, Numbers, Letters and numbers | Only those characters. |
| Letters (+accented characters), Letters (+accented characters) and numbers | The same, with letters such as é or ü. |
| Email Address | An email address. |
| Email Address /w DNS check | An email address whose domain exists. |
| Unique Field | A value no earlier submission of this form has. |
| Unique Field per User | A value this user (or, for guests, this IP address) has not sent before. |
| USA ZIP Code | A US ZIP code. |
| Phone Number (123-456-7890) | A phone number in that format. |
| Credit Card | An AMEX, Diners, Discover, Master or Visa number. |
| Custom Validation (Characters) | Only the characters in Extra Accepted Characters. |
| Passphrase | The exact text set in Default Value, for example a code given to members. |
| IP Address | An IP address. |
| Valid URL | An http or https address. |
| Regex | Your own regular expression. |
| Same Value as Other Field | The same value as another field, for example to repeat an email address. |
| Multiple Rules | All the rules chosen in Multiple Validation Rules. |
| IBAN | A bank account number in IBAN format. |
The Birthday Field has its own date rules, see Field types.
Form settings
On the Submission tab, sub-tab Validation:
| Setting | Meaning |
|---|---|
| Use AJAX Validation | Checks the form in the background when the visitor clicks submit and marks the errors without reloading the page. |
| Scroll To Form On Error | Scrolls back to the form when there are errors. |
| Required Fields Will Be Marked With | The mark after required captions, default (*). |
| Error Message | The message at the top of the form. Keep the {error} placeholder in your layout, or the message has nowhere to appear. |
| Remove Captcha for Logged Users | Logged-in users do not see the captcha fields. |
Fields that a condition hides are not checked.