Form Validation
What the API Validates
The API validates a subset of the form's rules — not everything the browser enforces on the web form.
| Rule | Enforced by API? |
|---|---|
| Required fields | ✅ Yes |
| Input mask pattern | ✅ Yes |
String type (textfield, textarea) | ✅ Yes |
Numeric type (number) | ✅ Yes |
Email format (email) | ✅ Yes |
Date format (date) | ✅ Yes |
| Min/max length | ❌ No |
| Numeric min/max range | ❌ No |
| URL format | ❌ No |
| Regex pattern validation | ❌ No |
| Custom JS validation | ❌ No |
Rules not enforced by the API are only applied when submitting through the browser form. If your integration depends on those constraints, validate the data in your calling system before sending.
Required Field Validation
Fields marked as required in the form builder must be present in the request. A missing required field returns a 400 error.
{
"error": "Invalid input data: Validation failed for 'Name': This field is required",
"code": "VALIDATION_ERROR"
}
Input Mask Validation
If a field has an input mask configured, the submitted value must match the mask pattern. See Display Settings for mask syntax.
Example — a field with mask +60 99-9999 9999 rejects +6012345678 (wrong format).
Type Validation
| Component type | Rule applied |
|---|---|
textfield, textarea | Must be a string |
number | Must be numeric |
email | Must be a valid email address |
date | Must be a valid date |
| All others | No type rule enforced |
Datagrid
Datagrid fields are arrays of objects. Each row is validated against the column rules above.
{
"items": [
{ "itemName": "Laptop", "quantity": 2 },
{ "itemName": "Monitor", "quantity": 1 }
]
}
Validation Error Format
"Invalid input data: Validation failed for '{field_label}': {message}"
Only the first failing field is reported. Fix it and resubmit to surface any additional failures.