Vue ValidationSummary Props
An object defining configuration properties for the UI component.
See Also
elementAttr
Specifies the global attributes to be attached to the UI component's container element.
- <template>
- <DxValidationSummary ...
- :element-attr="validationSummaryAttributes">
- </DxValidationSummary>
- </template>
- <script>
- import DxValidationSummary from 'devextreme-vue/validation-summary';
- export default {
- components: {
- DxValidationSummary
- },
- data() {
- return {
- validationSummaryAttributes: {
- id: 'elementId',
- class: 'class-name'
- }
- }
- }
- }
- </script>
items
An array of items displayed by the UI component.
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.
itemTemplate
Specifies a custom template for items.
See Also
onContentReady
A function that is executed when the UI component is rendered and each time the component is repainted.
Information about the event.
| Name | Type | Description |
|---|---|---|
| model | any | The model data. Available only if you use Knockout. |
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| component | The UI component's instance. |
The model data. Available only if you use Knockout.
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
The UI component's instance.
onDisposing
A function that is executed before the UI component is disposed of.
Information about the event.
| Name | Type | Description |
|---|---|---|
| model | any | The model data. Available only if you use Knockout. |
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| component | The UI component's instance. |
The model data. Available only if you use Knockout.
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
The UI component's instance.
onInitialized
A function used in JavaScript frameworks to save the UI component instance.
Information about the event.
| Name | Type | Description |
|---|---|---|
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| component | The UI component's instance. |
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
The UI component's instance.
- <template>
- <div>
- <DxValidationSummary ...
- @initialized="saveInstance">
- </DxValidationSummary>
- </div>
- </template>
- <script>
- import DxValidationSummary from 'devextreme-vue/validation-summary';
- export default {
- components: {
- DxValidationSummary
- },
- data: function() {
- return {
- validationSummaryInstance: null
- };
- },
- methods: {
- saveInstance: function(e) {
- this.validationSummaryInstance = e.component;
- }
- }
- };
- </script>
- <template>
- <div>
- <DxValidationSummary ...
- @initialized="saveInstance">
- </DxValidationSummary>
- </div>
- </template>
- <script setup>
- import DxValidationSummary from 'devextreme-vue/validation-summary';
- let validationSummaryInstance = null;
- const saveInstance = (e) => {
- validationSummaryInstance = e.component;
- }
- </script>
See Also
- Get a UI component Instance in Vue
onItemClick
A function that is executed when a collection item is clicked or tapped.
Information about the event.
| Name | Type | Description |
|---|---|---|
| model | any | Model data. Available only if you use Knockout. |
| itemIndex | The clicked item's index. | |
| itemElement | The item's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| itemData | The clicked item's data. | |
| event | Event (jQuery or EventObject) | The event that caused the function to execute. It is an EventObject or a jQuery.Event when you use jQuery. |
| element | The UI component's container. | |
| component | The UI component's instance. |
Model data. Available only if you use Knockout.
The clicked item's index.
The item's container. It is an HTML Element or a jQuery Element when you use jQuery.
The clicked item's data.
Event (jQuery or EventObject)
The event that caused the function to execute. It is an EventObject or a jQuery.Event when you use jQuery.
The UI component's container.
The UI component's instance.
onOptionChanged
A function that is executed after a UI component property is changed.
Information about the event.
| Name | Type | Description |
|---|---|---|
| value | any | The modified property's new value. |
| previousValue | any | The UI component's previous value. |
| name | The modified property if it belongs to the first level. Otherwise, the first-level property it is nested into. | |
| model | any | Model data. Available only if you use Knockout. |
| fullName | The path to the modified property that includes all parent properties. | |
| element | The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| component | The UI component's instance. |
The modified property's new value.
The UI component's previous value.
The modified property if it belongs to the first level. Otherwise, the first-level property it is nested into.
Model data. Available only if you use Knockout.
The path to the modified property that includes all parent properties.
The UI component's container. It is an HTML Element or a jQuery Element when you use jQuery.
The UI component's instance.
The following example shows how to subscribe to component property changes:
- <template>
- <DxValidationSummary ...
- @option-changed="handlePropertyChange"
- />
- </template>
- <script>
- import 'devextreme/dist/css/dx.light.css';
- import DxValidationSummary from 'devextreme-vue/validation-summary';
- export default {
- components: {
- DxValidationSummary
- },
- // ...
- methods: {
- handlePropertyChange: function(e) {
- if(e.name === "changedProperty") {
- // handle the property change here
- }
- }
- }
- }
- </script>
validationGroup
Specifies the validation group for which summary should be generated.
In the Knockout approach, the ValidationSummary UI component should be added to the div element representing the ValidationGroup component. In this instance, you do not have to specify the validationGroup property for the ValidationSummary UI component.
If you use the JQuery approach, the validationGroup property should be specified for the ValidationSummary UI component to generate a summary for a particular validation group. Assign the validation group name that is specified for the validationGroup property of the validators that extend the editors to be validated.