Angular ValidationSummary - items

An array of items displayed by the UI component.

Raised Events: onOptionChanged

Generally, the array of items is auto-generated when a validation result is ready. And if you set a custom array of items, it will be overridden by the auto-generated array. So use this property to read the current array of items. Alternatively, you can set the array of items generated by a custom validation engine.

disabled

Specifies whether the UI component item responds to user interaction.

Type:

Boolean

Default Value: false

html

Specifies the HTML markup to be inserted into the item element.

Type:

String

The ValidationSummary component evaluates the html property's value. This evaluation, however, makes the ValidationSummary potentially vulnerable to XSS attacks. To guard against these attacks, encode the HTML markup before you assign it to the html property. Refer to the following help topic for more information: Potentially Vulnerable API - html.

You can use the text property as a safe alternative.

template

Specifies a template that should be used to render this item only.

Type:

template

Template Data:

CollectionWidgetItem

The item object to be rendered.

jQuery

This property supports the following values:

  • A template container as a jQuery object or DOM Node
  • A function that returns a template container (as a jQuery object or DOM node)

For more information about templates, refer to the following help topic: DevExtreme Angular - Custom Templates.

index.js
$(function() {
    $("#validationSummaryContainer").dxValidationSummary({
        // ...
        items: [
            {
                // ...
                template: '<div>Custom Item</div>'
            }
        ]
    });
});
Angular

For more information about templates, refer to the following help topic: DevExtreme Angular - Custom Templates.

app.component.html
app.component.ts
app.module.ts
<dx-validation-summary ... >
    <dxi-validation-summary-item ... >
        <div *dxTemplate>
            <div>Custom Item</div>
        </div>
    </dxi-validation-summary-item>
</dx-validation-summary>
import { Component } from '@angular/core';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
})
export class AppComponent {
    // ...
}
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';

import { DxValidationSummaryModule } from 'devextreme-angular';

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        DxValidationSummaryModule
    ],
    providers: [ ],
    bootstrap: [AppComponent]
})
export class AppModule { }
Vue

For more information about templates, refer to the following help topic: DevExtreme Angular - Custom Templates.

App.vue
<template>
    <DxValidationSummary ... >
        <DxItem ... >
            <div>Custom Item</div>
        </DxItem>
    </DxValidationSummary>
</template>

<script>

import DxValidationSummary, {
    DxItem
} from 'devextreme-vue/validation-summary';

export default {
    components: {
        DxValidationSummary,
        DxItem
    },
    // ...
}
</script>
React
NOTE
Use the React-specific render and component properties instead of template.

For more information about templates, refer to the following help topic: DevExtreme Angular - Custom Templates.

App.js
import React from 'react';

import ValidationSummary, {
    Item
} from 'devextreme-react/validation-summary';

const renderCustomItem = () => {
    return <div>Custom Item</div>;
}

const App() = () => {
    return (
        <ValidationSummary ... >
            <Item ...
                render={renderCustomItem}
            >
            </Item>
        </ValidationSummary>
    );
}
export default App;
See Also

text

Specifies text displayed for the UI component item.

Type:

String

If you use both this property and a template, the template overrides the text.

visible

Specifies whether or not a UI component item must be displayed.

Type:

Boolean

Default Value: true