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

NameTypeRequiredMaxDescription
formValidationsarrayYes-Array of objects containing values and their corresponding validation rules. Maximum 10 entries.
formValidations[].valuestringYes-The value to be validated. Maximum 500 characters.
formValidations[].rulestringYes-The validation rule as a clear statement. Maximum 100 characters.
contextstringNo1000Optional context to guide the validation process. Maximum 1000 characters.
languagestringNo-Optional language for the validation explanations (en, fr, es, it, de, zh, ja, ko, pt, ru, ar, hi, auto). Default is auto.

Response

NameTypeDescription
dataobjectThe data of the validation process
data.resultsarrayArray of validation results for each input value
data.results[].isValidbooleanWhether the value passes all validation rules
data.results[].confidencenumberConfidence score for the validation result (0-1)
data.results[].explanationstringExplanation of which rules passed or failed
data.languagestringThe language used for the validation explanations
metadataobjectMetadata about the validation process
metadata.costnumberThe cost of the validation request (fixed at $0.001 per request)

Errors

{
   "error": "string", 
   "code": "string"
}
HTTP StatusError CodeMessage
400INVALID_PAYLOADOccurs when the payload is invalid.
400INVALID_REQUESTEx.: The request is invalid.
400DATA_FORM_VALIDATOR_ERROREx: could not validate values | parsing error
400HARM_CONTENTEx.: The content is harmful and cannot be processed.
400INSUFFICIENT_BALANCEThe user has insufficient balance
401UNAUTHORIZEDEx.: The token is invalid.
429TOO_MANY_REQUESTSEx.: The request limit has been reached.