Serverless AI Data Form Validator
AI powered data validation service that checks multiple values against custom validation rules and returns detailed validation results.
Endpoint
Validate data values against custom rules
POSThttps://api.xtartapp.com/data/form-validator
*Authentication
You must use a Bearer token provided by the dashboard to use for authentication. Add the token to the Authorization header.
Request body
Name | Type | Required | Max | Description |
---|---|---|---|---|
formValidations | array | Yes | - | Array of objects containing values and their corresponding validation rules. Maximum 10 entries. |
formValidations[].value | string | Yes | - | The value to be validated. Maximum 500 characters. |
formValidations[].rule | string | Yes | - | The validation rule as a clear statement. Maximum 100 characters. |
context | string | No | 1000 | Optional context to guide the validation process. Maximum 1000 characters. |
language | string | No | - | Optional language for the validation explanations (en, fr, es, it, de, zh, ja, ko, pt, ru, ar, hi, auto). Default is auto. |
Response
Name | Type | Description |
---|---|---|
data | object | The data of the validation process |
data.results | array | Array of validation results for each input value |
data.results[].isValid | boolean | Whether the value passes all validation rules |
data.results[].confidence | number | Confidence score for the validation result (0-1) |
data.results[].explanation | string | Explanation of which rules passed or failed |
data.language | string | The language used for the validation explanations |
metadata | object | Metadata about the validation process |
metadata.cost | number | The cost of the validation request (fixed at $0.001 per request) |
Errors
{
"error": "string",
"code": "string"
}
HTTP Status | Error Code | Message |
---|---|---|
400 | INVALID_PAYLOAD | Occurs when the payload is invalid. |
400 | INVALID_REQUEST | Ex.: The request is invalid. |
400 | DATA_FORM_VALIDATOR_ERROR | Ex: could not validate values | parsing error |
400 | HARM_CONTENT | Ex.: The content is harmful and cannot be processed. |
400 | INSUFFICIENT_BALANCE | The user has insufficient balance |
401 | UNAUTHORIZED | Ex.: The token is invalid. |
429 | TOO_MANY_REQUESTS | Ex.: The request limit has been reached. |