VAST XML validation rules reference
Every rule vastlint enforces against the IAB VAST specification (versions 2.0 through 4.3) is documented here. There are currently 108 rules across 9 categories. Click any rule ID for a detailed explanation, spec reference, and a code example showing the fix.
error — ad will likely fail to render. warning — spec violation or risky practice. info — advisory.
Group by
Required VAST fields (51)
errorVAST-2.0-root-elementRoot element must be <VAST>errorVAST-2.0-root-version<VAST> must have a version attributewarningVAST-2.0-root-version-valueVAST version attribute must be a recognised version stringerrorVAST-2.0-root-has-ad-or-error<VAST> must contain at least one <Ad> or <Error>warningVAST-4.0-wrapper-root-error<VAST> root contains both <Ad> and <Error> elements (invalid per VAST 4.0)errorVAST-2.0-ad-has-inline-or-wrapperEach <Ad> must contain exactly one <InLine> or <Wrapper>errorVAST-2.0-inline-adsystem<InLine> must contain <AdSystem>errorVAST-2.0-inline-adtitle<InLine> must contain <AdTitle>errorVAST-2.0-inline-impression<InLine> must contain at least one <Impression>errorVAST-2.0-inline-creatives<InLine> must contain <Creatives> with at least one <Creative>errorVAST-4.1-adservingid-present<InLine> must contain <AdServingId> (VAST 4.1+)errorVAST-4.0-universaladid-present<Creative> must contain <UniversalAdId> (VAST 4.0+)errorVAST-4.0-universaladid-idregistry<UniversalAdId> must have an idRegistry attributeerrorVAST-2.0-linear-duration<Linear> must contain <Duration>errorVAST-2.0-linear-mediafiles<Linear> must contain <MediaFiles> with at least one <MediaFile>errorVAST-2.0-mediafile-delivery<MediaFile> must have a delivery attributeerrorVAST-2.0-mediafile-type<MediaFile> must have a type attributeerrorVAST-2.0-mediafile-dimensions<MediaFile> must have width and height attributeserrorVAST-2.0-wrapper-adsystem<Wrapper> must contain <AdSystem>errorVAST-2.0-wrapper-impression<Wrapper> must contain at least one <Impression>errorVAST-2.0-wrapper-vastadtaguri<Wrapper> must contain <VASTAdTagURI>errorVAST-2.0-companion-resource<Companion> must contain at least one StaticResource, IFrameResource, or HTMLResourceerrorVAST-2.0-nonlinear-resourceInLine <NonLinear> must contain at least one StaticResource, IFrameResource, or HTMLResourceerrorVAST-3.0-pricing-model<Pricing> missing required model attributeerrorVAST-3.0-pricing-currency<Pricing> missing required currency attributewarningVAST-3.0-pricing-model-case<Pricing> model value should be lowercase in VAST 3.0 (cpm/cpc/cpe/cpv)warningVAST-3.0-pricing-currency-format<Pricing> currency attribute must be a 3-letter ISO-4217 codeerrorVAST-3.0-icon-program<Icon> missing required program attributeerrorVAST-3.0-icon-width<Icon> missing required width attributeerrorVAST-3.0-icon-height<Icon> missing required height attributeerrorVAST-3.0-icon-xposition<Icon> missing required xPosition attributeerrorVAST-3.0-icon-yposition<Icon> missing required yPosition attributeerrorVAST-3.0-icon-resource<Icon> must have at least one resource elementerrorVAST-4.0-category-authority<Category> missing required authority attributeerrorVAST-4.0-companion-clicktracking-id<CompanionClickTracking> missing required id attributeerrorVAST-4.0-universaladid-idvalue<UniversalAdId> missing required idValue attribute (VAST 4.0)warningVAST-4.1-universaladid-idvalue-removed<UniversalAdId> idValue attribute was removed in VAST 4.1errorVAST-4.1-universaladid-content<UniversalAdId> must have text content in VAST 4.1+errorVAST-4.1-mezzanine-delivery<Mezzanine> missing required delivery attributeerrorVAST-4.1-mezzanine-type<Mezzanine> missing required type attributeerrorVAST-4.1-mezzanine-width<Mezzanine> missing required width attributeerrorVAST-4.1-mezzanine-height<Mezzanine> missing required height attributewarningVAST-4.1-verification-no-resource<Verification> should have JavaScriptResource or ExecutableResourcewarningVAST-4.1-blockedadcategories-no-authority<BlockedAdCategories> should have authority attributewarningVAST-4.0-interactive-creative-no-api<InteractiveCreativeFile> should have an apiFramework attributewarningVAST-4.1-interactive-creative-type<InteractiveCreativeFile> should have a type attribute identifying the MIME typeerrorVAST-4.1-verification-vendor<Verification> is missing required vendor attributeerrorVAST-4.1-js-resource-apiframework<JavaScriptResource> is missing required apiFramework attributewarningVAST-4.3-js-resource-browser-optional<JavaScriptResource> should have a browserOptional attributeerrorVAST-4.1-exec-resource-apiframework<ExecutableResource> is missing required apiFramework attributeerrorVAST-4.1-exec-resource-type<ExecutableResource> is missing required type attribute
VAST document structure (2)
VAST XML schema rules (22)
errorVAST-2.0-text-only-elementText-only element contains a child elementwarningVAST-2.0-unknown-attributeElement has an attribute not defined in the VAST specerrorVAST-2.0-inline-unknown-child<InLine> contains an unrecognised child elementerrorVAST-2.0-wrapper-unknown-child<Wrapper> contains an unrecognised child elementerrorVAST-2.0-creatives-unknown-child<Creatives> may only contain <Creative> elementserrorVAST-2.0-creative-unknown-child<Creative> contains an unrecognised child elementerrorVAST-2.0-linear-unknown-child<Linear> contains an unrecognised child elementerrorVAST-2.0-trackingevents-unknown-child<TrackingEvents> may only contain <Tracking> elementserrorVAST-2.0-mediafiles-unknown-child<MediaFiles> contains an unrecognised child elementerrorVAST-2.0-extensions-unknown-child<Extensions> may only contain <Extension> elementserrorVAST-2.0-videoclicks-unknown-child<VideoClicks> contains an unrecognised child elementerrorVAST-2.0-nonlinearads-unknown-child<NonLinearAds> contains an unrecognised child elementerrorVAST-2.0-nonlinear-unknown-child<NonLinear> contains an unrecognised child elementerrorVAST-2.0-companionads-unknown-child<CompanionAds> may only contain <Companion> elementserrorVAST-2.0-companion-unknown-child<Companion> contains an unrecognised child elementerrorVAST-3.0-icons-unknown-child<Icons> may only contain <Icon> elementserrorVAST-3.0-icon-unknown-child<Icon> contains an unrecognised child elementerrorVAST-3.0-iconclicks-unknown-child<IconClicks> contains an unrecognised child elementerrorVAST-2.0-creativeextensions-unknown-child<CreativeExtensions> may only contain <CreativeExtension> elementserrorVAST-4.2-closedcaptionfiles-unknown-child<ClosedCaptionFiles> may only contain <ClosedCaptionFile> elementswarningVAST-2.0-extension-misplaced-element<Extension> contains an element that has a dedicated location in the VAST specwarningVAST-2.0-creative-extension-misplaced-element<CreativeExtension> contains an element that has a dedicated location in the VAST spec
Value format rules (12)
errorVAST-2.0-duration-format<Duration> value does not match HH:MM:SS[.mmm] formaterrorVAST-2.0-mediafile-delivery-enum<MediaFile> delivery must be "progressive" or "streaming"warningVAST-3.0-skipoffset-formatLinear skipoffset does not match HH:MM:SS[.mmm] or n% formatwarningVAST-3.0-progress-offset-formatTracking progress offset does not match required formatwarningVAST-3.0-skip-event-no-skipoffsetskip tracking event present but Linear has no skipoffset attributeerrorVAST-3.0-minmaxbitrate-pair<MediaFile> must have both minBitrate and maxBitrate or neitherwarningVAST-3.0-bitrate-conflict<MediaFile> has both bitrate and minBitrate/maxBitratewarningVAST-4.0-tracking-event-removedfullscreen/exitFullscreen tracking events were removed in VAST 4.0errorVAST-4.1-tracking-event-valueTracking event attribute not in the valid set for this VAST versionwarningVAST-4.1-adtype-valueAd adType must be video, audio, or hybridwarningVAST-4.1-companion-renderingmode-valueCompanion renderingMode must be default, end-card, or concurrentwarningVAST-3.0-companion-required-attr<CompanionAds> required attribute must be all, any, or none
Security and URL rules (4)
Consistency and parse rules (3)
Deprecated VAST features (5)
warningVAST-4.0-conditionaladconditionalAd attribute is deprecated as of VAST 4.1warningVAST-4.1-survey-deprecated<Survey> is deprecated as of VAST 4.1warningVAST-4.1-vpaid-apiframeworkapiFramework="VPAID" is deprecated as of VAST 4.1infoVAST-4.0-mediafile-apiframework<MediaFile apiFramework> is deprecated in VAST 4.0+ — use <InteractiveCreativeFile>warningVAST-2.0-flash-mediafileFlash-based MediaFile type is no longer supported
Ambiguous and underspecified rules (6)
errorVAST-3.0-progress-offset<Tracking event="progress"> requires an offset attributewarningVAST-3.0-icon-attrsIcon missing recommended attributes (program/width/height/position)warningVAST-2.0-nonlinear-dimensions<NonLinear> missing width or heightwarningVAST-2.0-companion-dimensions<Companion> missing width or heightwarningVAST-4.0-wrapper-clickthrough<ClickThrough> inside Wrapper <VideoClicks> was removed in VAST 4.0 (re-allowed in 4.2)warningVAST-4.2-icon-fallback-image-width-height<IconClickFallbackImage> should have width and height attributes