Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Validate ICU Message

localization.icu_message_validate

ProductionEngine wrapper (Class A)Deterministicstrictfastv1.0.0
No network

Overview

You send an ICU message pattern and a locale. We parse it, inventory every argument with its inferred usage, measure nesting, and flag a missing other clause, a conflicting argument type, or a pattern that does not parse. requireOtherClause is true unless you turn it off. maxNesting defaults to 20. We never format, never execute custom functions, and never compare a translation. A successful call costs 1 execution credit.

ICU MessageFormat fails at format time when other is missing or the pattern is ill-formed. Parsing first gives a structural answer without executing it.

Reliability

Same pattern, same locale, same ICU version, same answer. LOCALE_INVALID — trigger: locale is POSIX, empty or not a well-formed BCP 47 tag; retryable: no; next: send a hyphenated tag such as en-US. Structural problems return valid false with diagnostics rather than a typed failure.

Context footprint

One pattern in. A successful call costs 1 execution credit.

When to use it

When you hold one ICU pattern and need to know whether it parses and which arguments it declares.

When you want the formatted string, or a comparison against a translation.

Powered by ICU4J MessageFormat parsing (com.ibm.icu:icu4j).

Scope

Note
Parses one ICU MessageFormat pattern and reports arguments, nesting and structural diagnostics without formatting.

Non-goals

  • Does not format the message with arguments
  • Does not compare a source string to a translation
  • Does not validate custom functions beyond the ICU version in use

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysisvalidation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input512 KB

How we handle your data

Sensitive input, safe output
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.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
messagestringYesICU MessageFormat pattern to parse without formatting it.
localestringYesBCP 47 language tag used only to canonicalize the result.
requireOtherClausebooleanNoWhether plural and select arguments must include other; omit it for true.
maxNestingintegerNoMaximum argument nesting; omit it for 20.

Output schema

FieldTypeRequiredDescription
validbooleanYesWhether the pattern parsed and every structural rule passed.
canonicalTagstringYesCanonical BCP 47 tag for the supplied locale.
argumentCountintegerYesDistinct arguments inventoried.
nestingDepthintegerYesDeepest argument nesting observed.
argumentsarrayYesFrom 0 through 2000 closed argument rows in first-seen order; empty when the pattern has none.
diagnosticsarrayYesFrom 0 through 500 diagnostics sorted by path, offset, severity and code; empty when nothing was flagged.
truncatedbooleanYesWhether the diagnostic list was cut at 500 items.
_metaobjectYesClosed ICU and CLDR versions used for this answer, with icuVersion and cldrVersion strings.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"localization.icu_message_validate","input":{"message":"{count, plural, one {# file} other {# files}}","locale":"en-US"}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("localization.icu_message_validate", {"locale":"en-US","message":"{count, plural, one {# file} other {# files}}"});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
LOCALE_INVALID400NoThe request payload failed this skill's input validation.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not format the message with arguments
  • Does not compare a source string to a translation
  • Does not validate custom functions beyond the ICU version in use
  • Rendering the greeting with a real name
  • Diffing two translations against each other

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "localization.icu_message_validate",
  "input": {
    "locale": "en-US",
    "message": "{count, plural, one {# file} other {# files}}"
  }
}

Examples

Plural pattern with other

Inputjson
{
  "locale": "en-US",
  "message": "{count, plural, one {# file} other {# files}}"
}
Expected outputjson
{
  "nestingDepth": 1,
  "valid": true,
  "diagnostics": [],
  "truncated": false,
  "argumentCount": 1,
  "_meta": {
    "icuVersion": "76.1",
    "cldrVersion": "46.0"
  },
  "canonicalTag": "en-US",
  "arguments": [
    {
      "name": "count",
      "usage": "PLURAL",
      "occurrences": 1
    }
  ]
}
Tip
A well-formed plural inventories count as PLURAL

Plural pattern missing other

Inputjson
{
  "locale": "en",
  "message": "{count, plural, one {# file}}"
}
Expected outputjson
{
  "nestingDepth": 0,
  "valid": false,
  "diagnostics": [
    {
      "code": "MISSING_OTHER_CLAUSE",
      "severity": "ERROR",
      "message": "A plural or select argument is missing the required other clause.",
      "path": "/message",
      "location": {
        "utf16Offset": 0,
        "codePointOffset": 0
      },
      "source": "squillify"
    }
  ],
  "truncated": false,
  "argumentCount": 0,
  "_meta": {
    "icuVersion": "76.1",
    "cldrVersion": "46.0"
  },
  "canonicalTag": "en",
  "arguments": []
}
Tip
Missing other makes valid false with MISSING_OTHER_CLAUSE
  • Rejecting a plural pattern that forgot the other clause
  • Inventorying argument names before a translator starts work

Avoid for

  • Rendering the greeting with a real name
  • Diffing two translations against each other

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.

Tags

i18nmessageformatvalidationicu