Phone numbers missing digits, insurance IDs that are really group numbers, emails with typos, dates written as "next Thursday." Custom field validation catches these while the patient is still on the form and can fix them.
What You Can Validate
Length Limits
Set minimum and maximum character counts. A 10-character minimum on "reason for visit" stops one-word answers like "checkup."
Regex Patterns
Regular expressions enforce specific formats:
Email: ^[^\s@]+@[^\s@]+\.[^\s@]+$ ensures there's an @ sign and a domain.
Phone number: ^\+?[\d\s-()]+$ accepts common phone formats while rejecting text.
Date (YYYY-MM-DD): ^\d{4}-\d{2}-\d{2}$ enforces a specific date format.
Alphanumeric ID: ^[A-Za-z0-9]+$ restricts to letters and numbers only. Useful for insurance policy numbers or medical record IDs.
Custom Error Messages
When validation fails, the patient sees your message: "Please enter your 10-digit phone number including area code," not "Validation failed."
How to Set It Up
- Select the field in the form builder.
- Toggle on "Add custom validation rules" in field settings.
- Set your rules: min length, max length, regex pattern, error message.
- Test with valid and invalid inputs.
No code required.
Writing Good Error Messages
A perfect rule with a confusing message still fails: patients give up or type anything to get past it. Tell the patient what you want, not what they did wrong.
-
Bad: "Invalid format"
-
Good: "Please enter your phone number as (555) 555-5555"
-
Bad: "Field does not match required pattern"
-
Good: "Insurance ID should be 2 letters followed by 8 digits (e.g., AB12345678)"
Include an example when the format isn't obvious.
Finding the Right Strictness Level
Too loose doesn't help; too strict rejects valid answers. A phone regex that only accepts (555) 555-5555 rejects 555-555-5555 and 5555555555. Validate format loosely and content strictly: accept any phone format, but require exactly 10 digits.
Healthcare-Specific Patterns
Some validations come up repeatedly in medical forms:
- Insurance policy numbers: vary by carrier, but you can validate length and character type
- Medical record numbers: enforce your practice's specific format
- NPI numbers: 10-digit numeric format
- Date of birth: date picker fields handle this, but text fields need format validation
The Compound Effect
Two minutes of cleanup per form, across 500 forms a month, is over 16 staff hours. Clean data at entry stays clean in your reports, your billing, and every system downstream.
Related: patient intake software | intake form templates
Send intake forms patients actually finish.
- Forms, consents, and signatures before the visit
- Your paper forms converted by AI
- BAA included