@@ -179,7 +179,8 @@ General options most field types can handle:
179179 notitle: false , // Set to true to hide title
180180 description: " Street name" , // A description, taken from schema if available
181181 validationMessage: " Oh noes, please write a proper address" , // A custom validation error message
182- onChange: " valueChanged(form.key,modelValue)" // onChange event handler, expression or function
182+ onChange: " valueChanged(form.key,modelValue)" , // onChange event handler, expression or function
183+ feedback: false // inline feedback icons
183184}
184185```
185186
228229}
229230```
230231
232+ ### Inline feedback icons
233+ * input* and * textarea* based fields get inline status icons by default. A check
234+ when everything is valid and a cross when there are validation errors.
235+
236+ This can be turned off or configured to other icons. To turn off just
237+ set ``` feedback ``` to false. If set to a string that string is evaluated by
238+ a ``` ngClass ``` in the decorators scope. If not set att all the default value
239+ is ``` { 'glyphicon': true, 'glyphicon-ok': hasSuccess(), 'glyphicon-remove': hasError() } ```
240+
241+ ex. displaying an asterisk on required fields
242+ ``` javascript
243+ $sope .form = [
244+ {
245+ key: " name" ,
246+ feedback: " { 'glyphicon': true, 'glyphicon-asterisk': form.requires && !hasSuccess && !hassError() ,'glyphicon-ok': hasSuccess(), 'glyphicon-remove': hasError() }"
247+ }
248+ ```
249+
250+ Useful things in the decorators scope are
251+
252+ | Name | Description|
253+ | :---------------| :----------:|
254+ | hasSuccess() | * true* if field is valid and not pristine |
255+ | hasError() | * true* if field is invalid and not pristine |
256+ | ngModel | The controller of the ngModel directive, ex. ngModel.$valid |
257+ | form | The form definition for this field |
258+
259+
231260
232261Specific options per type
233262-------------------------
0 commit comments