File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
versioned_docs/version-9.0.0/guides Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -29,3 +29,16 @@ Validator object will be used only for `Attribute` and `HasMany` relationships.
29
29
## Defining FormObject validator with ` FormGroupOptions `
30
30
31
31
To validate a ` FormStore ` instance as a whole, a validator can be provided via ` formGroupOptions ` on ` FormObject ` .
32
+
33
+ This can be used for validating the ` BelongsTo ` relationships.
34
+
35
+ ``` ts title="user.form-object.ts"
36
+ import { Validators } from ' @angular/forms' ;
37
+ ...
38
+ public formGroupOptions : FormGroupOptions = {
39
+ validator : (form : FormStore ) => {
40
+ ...
41
+ },
42
+ };
43
+ ...
44
+ ```
Original file line number Diff line number Diff line change @@ -29,3 +29,16 @@ Validator object will be used only for `Attribute` and `HasMany` relationships.
29
29
## Defining FormObject validator with ` FormGroupOptions `
30
30
31
31
To validate a ` FormStore ` instance as a whole, a validator can be provided via ` formGroupOptions ` on ` FormObject ` .
32
+
33
+ This can be used for validating the ` BelongsTo ` relationships.
34
+
35
+ ``` ts title="user.form-object.ts"
36
+ import { Validators } from ' @angular/forms' ;
37
+ ...
38
+ public formGroupOptions : FormGroupOptions = {
39
+ validator : (form : FormStore ) => {
40
+ ...
41
+ },
42
+ };
43
+ ...
44
+ ```
You can’t perform that action at this time.
0 commit comments