---
title: "Interface: IViolationWarningData | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/Editor.Editor.IViolationWarningData/"
---

# Interface: IViolationWarningData

> A structure containing details about design elements that have preflight problems.

## Example

``` js
const renderingResult = await editor.finishProductDesign()
    // If an error occurred while completing product customization.
    .catch(error => console.error("Completing product customization failed with exception: ", error));

// If product customization is completed successfully, get the promise properties.
stateId = renderingResult.stateId;
userId = renderingResult.userId;
returnToEditUrl = renderingResult.returnToEditUrl;
preflightProblems = renderingResult.violationWarningData;

console.log("User " + userId + " successfully saved state " + stateId);
if (preflightProblems.length > 0) {
    console.log("The preflight check found some problems.");
}
```

## Properties

### type

> **type**: `string`

A type of the design element, for example, `PlainTextItem` or `ImageItem`.

***

### name

> **name**: `string`

A name of the design element.

***

### surfaceName

> **surfaceName**: `string`

A name of the surface containing the design element.

***

### surfaceIndex

> **surfaceIndex**: `number`

An index of the surface containing the design element.

***

### dpiValue?

> `optional` **dpiValue?**: `number`

A resolution of images or image placeholders that have the `Warning` or `Bad` states of the resolution check.

***

### qualityViolationState?

> `optional` **qualityViolationState?**: [`ViolationState`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md)

A state of the resolution check of images and image placeholders. This value is either `Good`, `Warning`, or `Bad`.

***

### safetyLineViolationState?

> `optional` **safetyLineViolationState?**: [`None`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md#none) \| [`Good`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md#good) \| [`Warning`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md#warning)

A state of the safety zone violation check. If `Warning`, the design element goes out of the safety lines.

***

### regionViolationState?

> `optional` **regionViolationState?**: [`None`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md#none) \| [`Good`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md#good) \| [`Warning`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md#warning)

A state of the out-of-region check. If `Warning`, the design element goes out of the region.

***

### textCropViolationState?

> `optional` **textCropViolationState?**: [`None`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md#none) \| [`Good`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md#good) \| [`Warning`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md#warning)

A state of the text clipping check.

***

### fontSizeViolationState?

> `optional` **fontSizeViolationState?**: [`ViolationState`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md)

A state of the font size violation check.
The state depends on container configuration:
- If font size is smaller than required and configuration has `severity: "warning"`, will be `Warning`
- If font size is smaller than required and configuration has `severity: "error"`, will be `Bad`

***

### rasterElementsViolationState?

> `optional` **rasterElementsViolationState?**: [`ViolationState`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md)

A state of the raster elements violation check.
The state depends on container configuration:
- If element contains raster images and configuration has `severity: "warning"`, will be `Warning`
- If element contains raster images and configuration has `severity: "error"`, will be `Bad`

***

### shapeViolationState?

> `optional` **shapeViolationState?**: [`None`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md#none) \| [`Good`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md#good) \| [`Warning`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md#warning)

A state of SVG and PDF upload check. Such graphics should appear on the canvas without any losses after uploading in the `Shape` mode.

***

### bleedViolationState?

> `optional` **bleedViolationState?**: [`None`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md#none) \| [`Good`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md#good) \| [`Warning`](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/enums/Editor.Editor.ViolationState.md#warning)

A state of the bleed zone violation check. If `Warning`, the design element goes out of the bleed zone.
