Error guide & FAQ
Plain-language explanations of the messages the FHIR validator produces, grouped by category. The same explanations appear on each issue in your validation results.
23 entries
Boolean must be true or false Data formats
- What it means
- Booleans must be real JSON booleans.
- Why
- Strings like "true", "yes" or 1 are not accepted.
- How to fix
- Send
trueorfalsewithout quotes.
"active": true
Validator message IDs: Error_parsing_JSON_the_primitive_value_must_be_a_boolean Type_Specific_Checks_DT_Boolean_Value
Content cannot be parsed Data formats
- What it means
- The content is not a recognisable FHIR resource or contains illegal characters.
- Why
- The parser rejected it.
- How to fix
- Send FHIR R4 JSON or XML, UTF-8 encoded.
Validator message IDs: No_processing_instructions_allowed_in_resources This_does_not_appear_to_be_a_FHIR_resource_unknown_namespacename_ UNICODE_XML_BAD_CHARS
Date outside reasonable range Data formats
- What it means
- The year is far in the past or future, often caused by a BS year (for example 2081) sent as an AD year.
- Why
- Bikram Sambat is about 56 years ahead of AD; BS years look like future dates.
- How to fix
- Convert BS to AD before sending.
"birthDate": "1985-07-02" // not 2042-03-18 (BS)
Validator message IDs: Type_Specific_Checks_DT_DateTime_Reasonable
Empty or whitespace-only value Data formats
- What it means
- The value is empty or only spaces.
- Why
- Empty strings are invalid in FHIR.
- How to fix
- Omit the element when there is nothing to say.
Validator message IDs: Type_Specific_Checks_DT_Code_WS Type_Specific_Checks_DT_Primitive_NotEmpty Type_Specific_Checks_DT_Primitive_WS_OTHER Type_Specific_Checks_DT_Primitive_WS_XML Type_Specific_Checks_DT_String_WS_ALL
Invalid base64 Data formats
- What it means
- The value is not valid base64.
- Why
- Binary data must be base64 encoded.
- How to fix
- Encode with standard base64 (no line breaks or data: prefix).
Validator message IDs: Type_Specific_Checks_DT_Base64_Valid
Invalid date or time format Data formats
- What it means
- The value at the reported location is not a valid FHIR date/dateTime/instant.
- Why
- FHIR only accepts ISO 8601 in the Gregorian calendar; other formats cannot be parsed by receivers.
- How to fix
- Use
YYYY,YYYY-MM,YYYY-MM-DDfor dates andYYYY-MM-DDThh:mm:ss+05:45for date-times. Convert Bikram Sambat (BS) dates to AD before sending; keep the BS date in the NP Core BS date extension if the IG offers one.
"birthDate": "1990-04-14" "recorded": "2025-01-20T09:30:00+05:45"
Validator message IDs: Type_Specific_Checks_DT_DateTime_Regex Type_Specific_Checks_DT_DateTime_Valid Type_Specific_Checks_DT_Date_Valid Type_Specific_Checks_DT_Instant_Valid
Invalid id Data formats
- What it means
- Ids may only contain letters, digits,
-and., up to 64 characters. - Why
- Servers cannot store other ids.
- How to fix
- Use something like a UUID or your internal key without spaces or slashes.
"id": "pat-0001"
Validator message IDs: Resource_RES_ID_Malformed_Chars Resource_RES_ID_Malformed_Length Type_Specific_Checks_DT_ID_Valid
Invalid narrative HTML Data formats
- What it means
- The
text.divnarrative uses HTML elements or attributes that FHIR does not allow (script, style, forms, onclick etc.). - Why
- Narratives are shown to clinicians and must be safe and renderable.
- How to fix
- Keep to basic XHTML: div, p, span, table, ul, ol, li, b, i, br, a, img. Remove scripts, styles and event attributes.
"text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Patient Ram Sharma</div>" }
Validator message IDs: XHTML_XHTML_Attribute_Illegal XHTML_XHTML_BAD_ELEMENT_TYPE XHTML_XHTML_BLOCK_IN_PARA XHTML_XHTML_ELEMENT_ILLEGAL_IN_PARA XHTML_XHTML_Element_Illegal XHTML_XHTML_Entity_Illegal XHTML_XHTML_ILLEGAL_CHILDREN XHTML_XHTML_Image_Reference_Illegal XHTML_XHTML_NO_CHILDREN XHTML_XHTML_NO_RECURSION XHTML_XHTML_OUT_OF_PLACE
Invalid number Data formats
- What it means
- The value is not a valid number or is outside the permitted range.
- Why
- Numbers must be real JSON numbers within the limits of the data type.
- How to fix
- Send a plain number (no quotes, no thousands separators, dot as decimal mark). Check minimum/maximum from the profile.
"valueQuantity": { "value": 72.5 }
Validator message IDs: Error_parsing_JSON_the_primitive_value_must_be_a_number Type_Specific_Checks_DT_Decimal_GT Type_Specific_Checks_DT_Decimal_LT Type_Specific_Checks_DT_Decimal_Range Type_Specific_Checks_DT_Decimal_Valid Type_Specific_Checks_DT_Integer64_Valid Type_Specific_Checks_DT_Integer_GT Type_Specific_Checks_DT_Integer_LT Type_Specific_Checks_DT_Integer_LT0 Type_Specific_Checks_DT_Integer_LT1 Type_Specific_Checks_DT_Integer_Valid
Invalid time Data formats
- What it means
- The time is not
hh:mm:ss. - Why
- Receivers cannot parse it.
- How to fix
- Use 24-hour
hh:mm:ss.
"09:30:00"
Validator message IDs: Type_Specific_Checks_DT_Time_Valid Type_Specific_Checks_DT_Time_Valid_Cause
Invalid URI, OID or UUID Data formats
- What it means
- OIDs start with
urn:oid:, UUIDs withurn:uuid:and must be lowercase; URIs contain no spaces. - Why
- Receivers parse these strictly.
- How to fix
- Fix the prefix/case, for example
urn:uuid:3f2b8c1e-5a3d-4f0e-9e57-2b1c8d6a7e10.
Validator message IDs: Type_Specific_Checks_DT_OID_Start Type_Specific_Checks_DT_OID_Valid Type_Specific_Checks_DT_URI_OID Type_Specific_Checks_DT_URI_UUID Type_Specific_Checks_DT_URI_WS Type_Specific_Checks_DT_UUID_Strat Type_Specific_Checks_DT_UUID_Valid
Leading or trailing whitespace Data formats
- What it means
- The string starts or ends with a space.
- Why
- Whitespace breaks exact matching.
- How to fix
- Trim the value.
Validator message IDs: Type_Specific_Checks_DT_String_WS
Malformed JSON Data formats
- What it means
- The body is not valid JSON (trailing comma, missing quote, comment, duplicate key...).
- Why
- Nothing can be validated until it parses.
- How to fix
- Run it through a JSON linter; common causes are trailing commas, single quotes and comments.
Validator message IDs: DUPLICATE_JSON_PROPERTY_KEY Error_parsing_ Error_parsing_JSON_ JSON_COMMA_EXTRA JSON_COMMA_MISSING JSON_COMMENTS_NOT_ALLOWED JSON_PROPERTY_NO_QUOTES JSON_PROPERTY_VALUE_NO_QUOTES
Narrative language mismatch Data formats
- What it means
- Resource.language and the narrative's lang attribute disagree or one is missing.
- Why
- Screen readers and translators use it.
- How to fix
- Add matching
langandxml:langto the div.
Validator message IDs: Language_XHTML_Lang_Different1 Language_XHTML_Lang_Different2 Language_XHTML_Lang_Missing1 Language_XHTML_Lang_Missing2 Language_XHTML_Lang_Missing3
Narrative language/source control Data formats
- What it means
- A narrative-control rule from the profile was not met.
- Why
- Profiles may require labelled narrative sections.
- How to fix
- Follow the rule in the message.
Validator message IDs: NARRATIVE_NOT_TRANSLATED XHTML_CONTROL_LANGS_REQUIRED XHTML_CONTROL_NO_LANGS XHTML_CONTROL_NO_SOURCE XHTML_XHTML_MIXED_LANG
Narrative root must be an XHTML div Data formats
- What it means
text.divmust be well-formed XHTML whose root isdivin the XHTML namespace.- Why
- Otherwise it cannot be rendered.
- How to fix
- Start with
<div xmlns="http://www.w3.org/1999/xhtml">and close all tags.
Validator message IDs: Error_parsing_XHTML_ XHTML_XHTML_DOCTYPE_ILLEGAL XHTML_XHTML_NS_InValid XHTML_XHTML_Name_Invalid
null is not allowed Data formats
- What it means
- the element is set to null.
- Why
- FHIR JSON has no null values (except placeholders in primitive arrays).
- How to fix
- Remove the property when you have no value; configure your JSON serializer to skip nulls.
Validator message IDs: ELEMENT_CANNOT_BE_NULL
Problem with link or id in narrative Data formats
- What it means
- A link, image or id inside the narrative is invalid or duplicated.
- Why
- Broken links are unsafe and confusing.
- How to fix
- Fix or remove the link/id.
Validator message IDs: Type_Specific_Checks_DT_XHTML_Resolve Type_Specific_Checks_DT_XHTML_Resolve_Img XHTML_URL_DATA_DATA_INVALID XHTML_URL_DATA_DATA_INVALID_COMMA XHTML_URL_DATA_MIMETYPE XHTML_URL_DATA_NO_DATA XHTML_URL_EMPTY XHTML_URL_INVALID XHTML_URL_INVALID_CHARS XHTML_XHTML_DUPLICATE_IDS
String expected Data formats
- What it means
- A number or boolean was sent where a string is required.
- Why
- JSON types must match FHIR types.
- How to fix
- Wrap the value in quotes.
Validator message IDs: Error_parsing_JSON_the_primitive_value_must_be_a_string
Time without timezone Data formats
- What it means
- A date-time that includes a time must include a timezone.
- Why
- Without it the moment in time is ambiguous.
- How to fix
- Append the offset: Nepal is
+05:45, or useZfor UTC.
"effectiveDateTime": "2025-01-20T09:30:00+05:45"
Validator message IDs: Type_Specific_Checks_DT_DateTime_TZ
URL could not be resolved Data formats
- What it means
- No definition was found for this URL value.
- Why
- Often a misspelt canonical URL.
- How to fix
- Check the URL, or ignore if it points to an external resource that is not part of FHIR.
Validator message IDs: Type_Specific_Checks_DT_URL_Resolve
Value does not match the required pattern Data formats
- What it means
- The value at the reported location does not match the pattern defined for this data type or profile.
- Why
- Pattern violations make data unparseable or ambiguous.
- How to fix
- Check the message for the expected pattern and fix the value (no leading/trailing spaces, right characters).
Validator message IDs: Type_Specific_Checks_DT_Primitive_Regex Type_Specific_Checks_DT_Primitive_Regex_Type
Value too long or too short Data formats
- What it means
- The text length violates the limit.
- Why
- Limits protect receivers.
- How to fix
- Shorten (or lengthen) the value as the message says.
Validator message IDs: PRIMITIVE_TOO_SHORT Type_Specific_Checks_DT_Primitive_Length Type_Specific_Checks_DT_String_Length