-
-
-
-
-
-```
-
-Now if you run the application and try to enter "admin" in one of the text fields (either optional or required), you should see the following error:
-
-
+You can supply a set of validator objects to the form using the `fieldValidators`
+property. Each validator implements checks for a particular type of data (eg, a
+date validator might check that the date in the field falls between 1980 and 2017).
+ADF supplies a standard set of validators that handle most common cases but you can
+also implement your own custom validators to replace or extend the set. See the
+[FormFieldValidator](FormFieldValidator.md) class for full details and examples.
## Other documentation
@@ -401,7 +278,13 @@ formService.formEvents.subscribe((event: Event) => {
});
```
+
+
## See also
-- [Form Stencils with Angular 2](stencils.md)
-- [Form Extensibility and Customisation](extensibility.md).
\ No newline at end of file
+- [Stencils](stencils.md)
+- [FormFieldValidator](FormFieldValidator.md)
+- [Extensibility](extensibility.md)
+- [Form rendering service](form-rendering.service.md)
+- [Form field model](form-field.model.md)
+
\ No newline at end of file
diff --git a/docs/seeAlsoGraph.json b/docs/seeAlsoGraph.json
index d3ab66c791..43b1817b5a 100644
--- a/docs/seeAlsoGraph.json
+++ b/docs/seeAlsoGraph.json
@@ -38,8 +38,17 @@
"file-uploading-dialog.component": [],
"folder-actions.service": ["document-actions.service"],
"form-list.component": [],
- "form.component": [],
+ "form-field.model": ["extensibility", "FormFieldValidator", "form-rendering.service"],
+ "form-rendering.service": ["extensibility"],
+ "form.component": [
+ "stencils",
+ "FormFieldValidator",
+ "extensibility",
+ "form-rendering.service",
+ "form-field.model"
+ ],
"form.service": [],
+ "FormFieldValidator": [],
"info-drawer.component": ["info-drawer-layout.component"],
"info-drawer-layout.component": [],
"like.component": ["rating.component"],
@@ -90,5 +99,6 @@
"user-info.component": [],
"user-preferences.service": [],
"viewer.component": [],
- "webscript.component": []
+ "webscript.component": [],
+ "widget.component": ["extensibility"]
}
\ No newline at end of file
diff --git a/docs/widget.component.md b/docs/widget.component.md
new file mode 100644
index 0000000000..cb61d61fe6
--- /dev/null
+++ b/docs/widget.component.md
@@ -0,0 +1,38 @@
+# Widget component
+
+Base class for standard and custom widget classes.
+
+## Basic Usage
+
+```ts
+import { Component } from '@angular/core';
+import { WidgetComponent } from 'ng2-activiti-form';
+
+@Component({
+ selector: 'custom-editor',
+ template: `
+ Look, I'm a custom editor!
+ `
+})
+export class CustomEditorComponent extends WidgetComponent {}
+```
+
+### Properties
+
+| Name | Type | Default | Description |
+| --- | --- | --- | --- |
+| readOnly | boolean | false | Does the widget show a read-only value? (ie, can't be edited) |
+| field | [FormFieldModel](form-field.model.md) | | Data to be displayed in the field |
+
+## Details
+
+The Widget component is the base class for all standard and custom form widgets. See the
+[Form Extensibility and Customisation](extensibility.md) page for full details about
+implementing custom widgets.
+
+
+
+## See also
+
+- [Extensibility](extensibility.md)
+
\ No newline at end of file