[Forms] Handle required flag in composite controls

Handle the ng-required flag in composite controls.
WTD-593.
This commit is contained in:
Victor Woeltjen 2014-12-03 15:51:42 -08:00
parent d54524a96c
commit 6a6797bf53
2 changed files with 7 additions and 9 deletions

View File

@ -18,15 +18,14 @@
"items": [
{
"name": "Width (px)",
"control": "textfield",
"pattern": "^(\\d*[1-9]\\d*)?$"
"control": "textfield"
},
{
"name": "Height (px)",
"control": "textfield",
"pattern": "^(\\d*[1-9]\\d*)?$"
"control": "textfield"
}
],
"pattern": "^(\\d*[1-9]\\d*)?$",
"property": "preferredSize",
"conversion": "number[]"
},
@ -36,15 +35,14 @@
"items": [
{
"name": "Horizontal grid (px)",
"control": "textfield",
"pattern": "^(\\d*[1-9]\\d*)?$"
"control": "textfield"
},
{
"name": "Vertical grid (px)",
"control": "textfield",
"pattern": "^(\\d*[1-9]\\d*)?$"
"control": "textfield"
}
],
"pattern": "^(\\d*[1-9]\\d*)?$",
"property": "layoutGrid",
"conversion": "number[]"
},

View File

@ -1,7 +1,7 @@
<ng-form name="mctFormItem" ng-repeat="item in structure.items">
<mct-control key="item.control"
ng-model="ngModel[field]"
ng-required="item.required"
ng-required="ngRequired"
ng-pattern="ngPattern"
options="item.options"
structure="row"