Skip to content

Validation errors

The registry serves tokens as they are written and reports errors found by its checks in validation_errors. Why, which fields are mandatory, and when a token does not appear at all: A permissive registry.

{
"cip": "CIP-68",
"sub_standard": "333",
"field_name": "description",
"field_category": "MANDATORY",
"code": "missing_value",
"error": "description field is missing a mandatory value"
}
FieldMeaning
cipthe standard whose rule is broken: CIP-26, CIP-68 or CIP-113
sub_standardfor CIP-68, the label the rule was checked for (333, 444); absent when the rule does not depend on a label
field_namethe field, e.g. description, logo, version, properties.owner, companion_metadata
field_categoryMANDATORY if the standard requires the field, OPTIONAL otherwise
codea stable code for programs, see below
errora message for people

metadata.valid is true exactly when there are no errors.

?validation=Returns
ALL (default)every token, with its errors
MANDATORY_ONLYtokens with no MANDATORY error: problems only in optional fields are tolerated
STRICTtokens with no reported validation errors, whether MANDATORY or OPTIONAL

A token that the chosen level does not accept is a 404, or is left out of a batch. The errors of a token that is returned are never filtered by the validation level.

With ?property=, validation errors are scoped to the requested properties before the registry calculates metadata.valid and applies MANDATORY_ONLY or STRICT. For example, ?property=ticker&validation=STRICT can return a token whose description is missing, provided no reported error affects the ticker.

Errors that concern all metadata, such as no_nested_entry and missing CIP-113 companion_metadata, remain regardless of ?property=. An image error also applies when logo is requested, since rich fungible tokens expose their image as the logo.

CodeMeaning
missing_valuea field the standard requires is missing or empty: for CIP-68 the version and, as the label requires, name, description (333) and image (444); for CIP-26 name and description; for CIP-113 the token’s CIP-26 or CIP-68 metadata (companion_metadata)
wrong_typethe value has a type the standard does not allow, e.g. a number where text is expected; a value that cannot be kept is left out
invalid_uri_schemean image or logo is not a URI with a scheme CIP-68 allows (https, ipfs, ar, data); the value is kept as written
invalid_lengtha CIP-26 text is shorter or longer than CIP-26 allows, e.g. a name over 50 characters
invalid_valuea CIP-26 value breaks another rule of the CIP-26 validator
out_of_rangea number is out of range: decimals
invalid_versionthe CIP-68 version is there but unusable: not an integer, not a 64-bit integer, or outside 1 to 4
plutus_constructora property holds a Plutus constructor, which CIP-68 metadata does not allow; it is kept as {constructor, fields}
not_utf8a text is not valid UTF-8; it is kept as hex
invalid_files_entryan entry of files breaks the CIP-68 definition, e.g. no mediaType or src
no_nested_entrya nested datum ("721") has no entry for the token
too_deepa property is nested more than 100 levels and is left out; the rest is kept
unsupported_keya map key has no text form (a list or a map) and is left out
key_collisiontwo keys read the same, e.g. the text 1 and the integer 1; one is kept
invalid_base64a CIP-26 logo is not valid base64
too_largea CIP-26 logo is over 64 KiB once decoded; over 1,400,000 base64 characters it is not stored at all

New codes may be added.

Some inputs cannot be indexed. The registry records these reasons in its internal invalid_token table for operators; they are not subject responses or a public error-query API:

CodeWhen
filename_subject_mismatcha CIP-26 file named after another subject than the one inside it
unusable_subjecta CIP-26 subject that is not hex, or not 56 to 120 characters
datum_undecodable, datum_too_deep_to_decodea CIP-68 datum that cannot be decoded
registry_node_unparseablea CIP-113 registry node that cannot be read

A datum that is not CIP-68 at all is simply ignored, rather than recorded in that table.

Built on Yaci Store and cardano-client-lib by BloxBean.