Enum Values Validator
schema.validate_enum_values
Overview
You send a JSON payload and, for each field you care about, the list of values it is allowed to hold. We look the field up by path and tell you when it holds something else, when it is null, or when it is not there at all. Where the value is a near-miss for one of your allowed values we name the one you probably meant, which turns a typo into a one-line fix. This is a targeted check on the fields you list, not full schema validation.
A single unexpected value in a status or currency field is enough to have an API reject your request, and writing the same membership check by hand in every caller is wasted effort. You describe the allowed values once and get a precise answer.
Reliability
Deterministic: the same payload and rules always produce the same violations and the same suggestions, and on a tie between equally close candidates we pick the alphabetically first. Numbers are compared by value, so 1 satisfies an allowed 1.0. A path that is not present in the payload counts as a violation rather than being skipped, so only list fields you expect to be there. We reject the call, and an unchanged retry will not help, when payload is missing or is not an object, when enums is missing or is not an array, when a rule lacks a string path or an allowedValues array, when arrayMode is anything other than value or each, or when maxErrors falls outside 1 to 10000.
Context footprint
The payload is capped at 1000000 bytes and is never echoed back; the response holds one short row per violation, up to maxErrors. A successful call costs 1 execution credit.
When to use it
When only a handful of fields are constrained and you want them checked cheaply, with a hint about what the right value probably was.
When the whole document needs checking against a schema, or when the constraint is a range, a length, or a pattern rather than a fixed list.
Scope
Non-goals
- We never run full schema validation — that is schema.validate_json
- We never audit which fields are present overall — that is schema.check_required_fields
- We never change the payload or correct a value for you
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| payload | object | Yes | JSON object to check; extra keys are payload fields and only the named paths are read. — unconstrained RFC 8259 JSON items. |
| enums | array | Yes | Rules to apply, 1 through 1000 closed objects each naming a path and its allowed values. |
| maxErrors | integer | No | How many violations to report, 1 through 10000; omit it for 1000. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| valid | boolean | Yes | True when every rule was satisfied. |
| errors | array | Yes | Violations in rule order, 0 through 10000 closed objects; empty when valid. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"schema.validate_enum_values","input":{"payload":{"status":"active"},"enums":[{"path":"/status","allowedValues":["active"]}]}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("schema.validate_enum_values", {"payload":{"status":"activ"},"enums":[{"allowedValues":["active","inactive"],"path":"/status"}]});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- We never run full schema validation — that is schema.validate_json
- We never audit which fields are present overall — that is schema.check_required_fields
- We never change the payload or correct a value for you
- Checking a whole document against a schema (schema.validate_json)
- Auditing which fields are present (schema.check_required_fields)
- Checking numeric ranges, lengths, or patterns
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "schema.validate_enum_values",
"input": {
"payload": {
"status": "activ"
},
"enums": [
{
"allowedValues": [
"active",
"inactive"
],
"path": "/status"
}
]
}
}Examples
Invalid enum with suggestion
{
"payload": {
"status": "activ"
},
"enums": [
{
"allowedValues": [
"active",
"inactive"
],
"path": "/status"
}
]
}{
"errors": [
{
"suggestion": "active",
"path": "/status",
"actual": "activ",
"allowedValues": [
"active",
"inactive"
]
}
],
"valid": false
}Valid enum value
{
"payload": {
"status": "active"
},
"enums": [
{
"allowedValues": [
"active",
"inactive"
],
"path": "/status"
}
]
}{
"errors": [],
"valid": true
}Recommended use cases
- Guard the status, type, and currency fields in a payload you are about to send
- Catch the case where an upstream service quietly added a new value you do not handle
- Turn a misspelled value into a concrete suggestion you can act on
Avoid for
- Checking a whole document against a schema (schema.validate_json)
- Auditing which fields are present (schema.check_required_fields)
- Checking numeric ranges, lengths, or patterns
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.