How to Set Up Form Validation in UniLink (Ensure Clean Data From Every Submission)

Configure validation rules on every field so bad data never enters your CRM or response log.

TL;DR: In the Form Builder, open any field's settings and enable the validation rules you need — required, email format, phone format, character limits, custom error messages, regex patterns. UniLink also runs automatic spam filtering on every submission. Save and publish to enforce rules immediately.

A form without validation is a pipeline for dirty data. Typos in email addresses, wrong phone formats, and blank required fields mean missed follow-ups and broken CRM records. UniLink's form validation lets you set rules per field so the form refuses to submit until every entry meets your standards — and gives the visitor a clear, specific error message so they know exactly what to fix.

What Form Validation Does

Validation in UniLink operates at two levels. Client-side validation checks each field as the visitor fills in the form and shows an inline error the moment a rule is broken — before anything is sent to the server. This gives instant feedback and prevents most bad submissions before they happen. Server-side validation then runs a second check on every submission to catch anything that slips through, including programmatic or bot submissions.

Built-in rules cover the most common cases: required fields, email format, phone format, and minimum/maximum character counts. For anything beyond that — postal codes, custom ID formats, specific date ranges — you can write a regex pattern and a custom error message. The visitor never sees the regex; they only see the friendly error you write.

All validation happens within the UniLink editor — no code, no plugins, no external validation service needed.

How to Get Started With Form Validation

  1. Open the form in the Dashboard editor — go to Sites, click Edit on your page, and click on the Form block you want to configure.
  2. Select a field to validate — click any field inside the form block. Its settings panel opens on the right side of the editor.
  3. Enable the Required toggle — if the field must be filled before submit, turn on Required. An asterisk appears next to the field label automatically.
  4. Choose a format rule if applicable — for Email fields, the format rule is on by default. For Phone fields, open the Validation section and select the expected format (e.g., US, International E.164, or any numeric).
  5. Set character limits for text fields — in the Validation section, type a number into Min Characters and/or Max Characters. Leave either blank to skip that bound.
  6. Write a custom error message — in the Error Message field, type what you want the visitor to see when this rule fails. If left blank, UniLink uses a generic fallback message.
  7. Save and test — click Save, then use Preview to fill in the form and intentionally break each rule to confirm the error messages appear correctly.

How to Use Form Validation

  1. Add email format validation — select the Email field, confirm the Email Format rule is enabled. The form will reject entries that do not contain an "@" and a valid domain suffix.
  2. Add phone format validation — select the Phone field, open Validation, pick a phone format rule. For international audiences choose "Any valid phone number"; for a local audience choose a country-specific format to catch local formatting errors.
  3. Add a character limit to a text field — useful for fields like "Tell us about your project." Set a Max Characters limit (e.g., 500) so submissions stay manageable. The form shows a character counter to the visitor as they type.
  4. Add regex validation for advanced cases — select a Text field, scroll to Advanced Validation, enable Regex, and enter your pattern (e.g., ^\d{5}$ for a US zip code). Write a plain-language error message such as "Please enter a 5-digit zip code."
  5. Enable spam prevention — in Form Settings, turn on Spam Filter. This adds invisible bot detection. If you are receiving spam despite the filter, also enable CAPTCHA from the same panel.
  6. Test each validation rule in Preview — submit intentionally bad values for every validated field and confirm the error message matches what you wrote. Fix any message that is unclear before publishing.
  7. Check validation on mobile — switch to mobile preview in the Dashboard. Some field types (e.g., phone) use the device keyboard; confirm the error messages are readable at mobile screen widths.

Key Settings Explained

SettingWhat it controlsBest practice
RequiredPrevents form submission if the field is emptyEnable only for fields you truly cannot work without — every required field reduces conversion rate
Email FormatRejects entries that are not valid email addressesAlways on for email fields — invalid email addresses are the single most common data quality issue
Phone FormatEnforces a specific phone number patternUse "International" format if your audience is global; use country-specific only for local-only businesses
Min / Max CharactersSets a floor or ceiling on text input lengthSet a max on open-ended text fields to avoid extremely long submissions; set a min on fields like "Company name" to catch placeholder entries
Regex Pattern + Custom Error MessageValidates input against any regular expression and shows your custom message on failureAlways write a human-readable error message — the regex pattern is invisible to visitors, so the message must tell them exactly what format is expected
Pro tip: Write error messages that explain the expected format, not just that something is wrong. "Enter a valid email address" is better than "Invalid input." "Phone must be 10 digits, no spaces or dashes" is better than "Invalid phone number." Specific messages reduce form abandonment.

How to Get the Most Out of Form Validation

Validation rules are only useful if visitors understand the expected format before they start typing. Add placeholder text to each field showing an example — for example, "[email protected]" in the Email field and "+1 555 000 0000" in the Phone field. This prevents many validation errors from occurring in the first place.

Review your form responses monthly for patterns in rejected or malformed entries. If a specific field consistently produces errors — for example, visitors entering their phone number with country code when you expected local format — adjust the validation rule or placeholder text to match how your audience actually fills in the field.

For forms connected to a CRM, tighter validation at the form level means less cleanup work downstream. Email format validation alone can cut the number of undeliverable contacts in your list by a significant margin. If your CRM enforces specific formats for custom fields, match those formats exactly using regex validation so data flows in cleanly without triggering CRM import errors.

Character limits on open-ended fields also serve a UX purpose. Visitors who see a character counter know how much space they have and tend to write more concise, useful answers. For survey-style forms, this improves the quality of qualitative data you collect alongside the structural data like email and phone.

Troubleshooting Common Issues

ProblemLikely causeFix
Validation error not showing on submitThe field type does not support the selected rule, or the rule is saved but not publishedConfirm the rule is enabled (toggle is on) and that you clicked Save and Publish after making changes
Regex rule blocking valid entriesPattern is too strict or has an error in the expressionTest the regex in a tool like regex101.com before pasting it into UniLink; use the Preview form to test several valid examples
Phone validation rejects valid international numbersCountry-specific format is selected but visitors are entering international formatSwitch the Phone Format rule from country-specific to "International (E.164)" or "Any valid number"
Spam submissions still coming through after enabling filterSophisticated bots that pass basic bot detectionEnable CAPTCHA in Form Settings in addition to the spam filter; also consider adding a hidden honeypot field via the Advanced Settings toggle

Pros

  • Inline client-side errors give visitors instant feedback without a page reload
  • Built-in email and phone format rules require no configuration — they work out of the box
  • Regex support covers any custom data format without needing external validation code
  • Custom error messages let you guide visitors in your own brand voice

Cons

  • Regex validation requires knowledge of regular expressions — there is no visual rule builder
  • Character limits do not prevent visitors from pasting in text that appears correct but contains hidden characters
  • CAPTCHA adds a small interaction step that can reduce completion rates on high-traffic forms

Frequently Asked Questions

Can I show a different error message for each validation rule on the same field?

Yes. Each validation rule — Required, Email Format, Min Characters, Max Characters, Regex — has its own Error Message field in the settings panel. You can write a distinct message for each rule so visitors know exactly which constraint was violated.

Does validation run before the form is submitted or after?

Client-side validation runs as the visitor fills in the form and again when they click Submit. Server-side validation runs on every submission that reaches the server. Both must pass for a submission to be recorded.

Can I validate a Dropdown or Checkbox field?

Dropdown and Checkbox fields support the Required rule only. Format and character-length rules do not apply because the visitor selects from predefined options rather than typing free text.

Is there a way to test validation without publishing the form?

Yes. Use the Preview button in the Dashboard editor to open the form in a test environment. Submissions made in Preview are marked as test responses in your Responses tab and do not trigger CRM integrations or notification emails.

What happens if a visitor's browser has JavaScript disabled?

Client-side validation requires JavaScript. If JavaScript is disabled, validation falls back to the server-side check. The visitor will still see error messages, but they will appear after a full page reload rather than inline. This situation is rare in modern browsing.

Key Takeaways

  • Enable field-level validation rules — Required, Email Format, Phone Format, character limits, and Regex — in the field settings panel inside the Form Builder.
  • Write a specific, human-readable error message for every rule so visitors know exactly what to fix.
  • Use placeholder text with format examples to prevent validation errors before they happen.
  • Regex validation handles any custom format requirement — test your pattern before saving it to the form.
  • Enable the Spam Filter and optionally CAPTCHA in Form Settings to keep bot submissions out of your response log.

Ready to collect clean data from every submission?

Set up your form with validation rules in UniLink and stop dealing with bad data in your CRM.

Get Started Free