ValidationGroup
import { ValidationGroup } from 'cx/widgets';The ValidationGroup element is pure container element which allows tracking the state of the form.
If any of the fields inside it report a validation error, invalid state is reported to the data store.
<div class="widgets" style={{
borderLeftWidth: '3px',
borderLeftStyle: 'solid',
borderLeftColor: { expr: '{$page.valid} ? "lightgreen" : "red"' }
}}>
<ValidationGroup layout={LabelsLeftLayout} valid-bind="$page.valid">
<TextField label="First Name" value-bind="$page.firstName" required />
<TextField label="Last Name" value-bind="$page.lastName" required />
</ValidationGroup>
</div>| Property | Description | Type |
|---|---|---|
asterisk | Set to | boolean |
disabled | Set to | boolean |
enabled | Set to | boolean |
invalid | Binding which will be set to true if any of child form field reports validation error. | boolean |
isolated | Set to | boolean |
readOnly | Set to | boolean |
strict | Set to | boolean |
tabOnEnterKey | Set to | boolean |
valid | Binding which will be set to true if all child form field are valid. | boolean |
viewMode | Set to | boolean |
items | List of child elements. | array |
layout | Define an inner layout. | string/object |
mod | Appearance modifier. For example, | string/array |
outerLayout | Defines the outer layout which wraps the widget. | widget |
plainText | Set to | boolean |
preserveWhitespace | Keep whitespace in text based children. Default is | boolean |
putInto | Used with outer layouts. Specifies the name of the content placeholder which should render the widget. | string |
trimWhitespace | Remove all whitespace in text based children. Default is | boolean |
vdomKey | Key that will be used as the key when rendering the React component. | string |
visible | Visibility of the widget. Defaults to | boolean |