Validation

Automatic input validation that catches errors before submission.

How Validation Works

Validation ensures that the data users enter into your form meets your requirements before it is submitted. When a user tries to submit a form, Bosca checks every field against the rules you defined in the form builder. If any field has an issue — a required field left blank, an invalid email address, a number outside the allowed range — the form displays a clear error message next to the problem field and prevents submission until the issue is corrected.

Validation runs in the user's browser, so feedback is instant. Users do not need to wait for a server response to see what needs to be fixed.

Supported Validation Rules

You can apply the following validation rules to any form field. All rules are configured in the form builder — no coding is required.

RuleWhat It DoesExample
RequiredThe field must be filled in before the form can be submittedA "Full Name" field that cannot be left blank
TypeThe value must match the expected data type (text, number, etc.)An "Age" field that only accepts numbers
Allowed ValuesThe value must be one of a predefined list of optionsA "Department" dropdown limited to specific department names
Min / MaxA numeric value must fall within a specified rangeA "Quantity" field that accepts values between 1 and 100
Min / Max LengthText must be within a specified character countA "Bio" field with a maximum of 500 characters
PatternText must match a specific formatA "Phone Number" field that requires a particular phone format
FormatSemantic validation for common data formatsAn "Email" field that checks for a valid email address, or a "Website" field that checks for a valid URL
You can combine multiple rules on a single field. For example, an email field can be both required and validated with the email format rule, ensuring the user both fills it in and provides a properly formatted email address.

Nested Field Validation

Forms can contain grouped fields — for example, an address group with separate fields for street, city, state, and zip code. When you use grouped fields, each sub-field is validated independently. If the city is missing but the zip code is valid, only the city field shows an error.

This means users see targeted feedback on exactly which part of a grouped field needs attention, rather than a single generic error for the entire group.

How Errors Are Displayed

When validation catches a problem, the error is displayed directly next to the relevant field with a clear message explaining what is wrong. For example:

  • A required field left blank shows: "This field is required"
  • An invalid email shows: "Must be a valid email address"
  • A number outside the allowed range shows the minimum or maximum value allowed
  • Text exceeding the character limit shows the maximum length allowed

Error messages are designed to be clear and actionable, telling the user exactly what to fix. The field itself is visually highlighted so it is easy to spot, even in long forms.

When Validation Runs

Validation runs at two key moments:

  • On submission — When the user clicks the submit button, all fields are validated at once. If any field fails, the form scrolls to the first error and prevents submission.
  • On field change — As users fill out the form, individual fields can be validated in real time, providing immediate feedback as they move from one field to the next.
Set validation rules during the form design process in the form builder. Select any field on the canvas, and the settings panel on the right will show all available validation options for that field type.

For details on how fields and their types are defined, see Schemas. For information about the input controls that display validation errors, see Controls.