Angular ValidationGroup Properties
An object defining configuration options for the ValidationGroup widget.
See Also
- Configure a Widget: Angular | Vue | React | jQuery | AngularJS | Knockout | ASP.NET MVC 5 | ASP.NET Core
elementAttr
Specifies the attributes to be attached to the widget's root element.
jQuery
$(function(){
    $("#validationGroupContainer").dxValidationGroup({
        // ...
        elementAttr: {
            id: "elementId",
            class: "class-name"
        }
    });
});Angular
<dx-validation-group ...
    [elementAttr]="{ id: 'elementId', class: 'class-name' }">
</dx-validation-group>
import { DxValidationGroupModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxValidationGroupModule
    ],
    // ...
})Vue
<template>
    <DxValidationGroup ...
        :element-attr="validationGroupAttributes">
    </DxValidationGroup>
</template>
<script>
import DxValidationGroup from 'devextreme-vue/validation-group';
export default {
    components: {
        DxValidationGroup
    },
    data() {
        return {
            validationGroupAttributes: {
                id: 'elementId',
                class: 'class-name'
            }
        }
    }
}
</script>React
import React from 'react';
import ValidationGroup from 'devextreme-react/validation-group';
class App extends React.Component {
    validationGroupAttributes = {
        id: 'elementId',
        class: 'class-name'
    }
    render() {
        return (
            <ValidationGroup ...
                elementAttr={this.validationGroupAttributes}>
            </ValidationGroup>
        );
    }
}
export default App;height
Specifies the widget's height.
This option accepts a value of one of the following types:
- Number 
 The height in pixels.
- String 
 A CSS-accepted measurement of height. For example,- "55px",- "80%",- "inherit".
- Function 
 A function returning either of the above. For example:JavaScript- height: function() { return window.innerHeight / 1.5; }
onDisposing
A function that is executed before the widget is disposed of.
Information about the event.
| Name | Type | Description | 
|---|---|---|
| component | The widget's instance. | |
| element | The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| model | Model data. Available only if you use Knockout. | 
onInitialized
A function used in JavaScript frameworks to save the widget instance.
Information about the event.
| Name | Type | Description | 
|---|---|---|
| component | The widget's instance. | |
| element | The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. | 
onOptionChanged
A function that is executed after a widget option is changed.
Information about the event.
| Name | Type | Description | 
|---|---|---|
| model | Model data. Available only if you use Knockout. | |
| fullName | The path to the modified option that includes all parent options. | |
| element | The widget's container. It is an HTML Element or a jQuery Element when you use jQuery. | |
| component | The widget's instance. | |
| name | The modified option if it belongs to the first level. Otherwise, the first-level option it is nested into. | |
| value | any | The modified option's new value. | 
width
Specifies the widget's width.
This option accepts a value of one of the following types:
- Number 
 The width in pixels.
- String 
 A CSS-accepted measurement of width. For example,- "55px",- "80%",- "auto",- "inherit".
- Function 
 A function returning either of the above. For example:JavaScript- width: function() { return window.innerWidth / 1.5; }
If you have technical questions, please create a support ticket in the DevExpress Support Center.