rapidform / Documentation

Validation Rules

RapidForm validates submissions both on the client and on the server to ensure data quality and prevent invalid entries.

Required Fields

Mark any field as Required in the field settings. When a required field is left empty, the submission is blocked and an error message is displayed below the field.

For checkbox fields, "required" means at least one option must be selected.

Built-In Type Validation

Certain field types have automatic validation:

Field Type Automatic Validation
Email Must be a valid email address format
Number Must be a numeric value
File Upload Must be an allowed file type and under 10 MB
Text / Textarea / Email / Phone Maximum 5,000 characters (unless a custom max length is set)

Custom Validation Rules

You can add custom validation rules to individual fields in the field settings panel:

Min/Max Length (Text Fields)

Set minimum and maximum character lengths for text, textarea, email, and phone fields.

  • Min Length — The minimum number of characters required.
  • Max Length — The maximum number of characters allowed. Overrides the default 5,000 character limit.

Min/Max Value (Number Fields)

Set minimum and maximum numeric values for number fields.

  • Min Value — The lowest acceptable number.
  • Max Value — The highest acceptable number.

Regex Pattern

Apply a custom regular expression pattern to validate text input. Useful for enforcing specific formats.

Examples:

  • US phone number: /^\(\d{3}\) \d{3}-\d{4}$/
  • ZIP code: /^\d{5}(-\d{4})?$/
  • Alphanumeric only: /^[a-zA-Z0-9]+$/

How Validation Errors Display

When a submission fails validation:

  1. The form remains on screen (it does not reset).
  2. Error messages appear directly below each invalid field in red text.
  3. The submit button is re-enabled so the user can correct their input and try again.

Errors are cleared as soon as the user resubmits.

Conditional Fields and Validation

Fields that are hidden by conditional logic are excluded from validation entirely. If a field is required but currently hidden because its condition is not met, the submission will succeed without that field. See Conditional Logic for more details.

← Previous Conditional Logic Next → Embedding Forms