@@ -30,7 +30,7 @@ Why use ngxErrors, how to install and include.
3030
3131### What is it?
3232
33- Form validation made easy for reactive forms. Typically you'd do something like this:
33+ Form validation error reporting made easy for reactive forms. Typically you'd do something like this:
3434
3535``` js
3636< input type= " text" formControlName= " foo" >
@@ -108,7 +108,7 @@ The `ngxError` directive takes either a `string` or `array` as arguments. The ar
108108
109109> Note: when using array syntax, ` [] ` bindings are needed
110110
111- Using an error, will show the error message when either condition are true :
111+ Using the array syntax, when any condition in the array is true the error will be shown :
112112
113113``` html
114114<input type =" text" formControlName =" username" >
@@ -125,8 +125,8 @@ The `when` directive takes either a `string` or `array` as arguments. It allows
125125
126126``` html
127127<input type =" text" formControlName =" username" >
128- <div nxgErrors =" username" >
129- <div nxgError =" minlength" when =" dirty" >
128+ <div ngxErrors =" username" >
129+ <div ngxError =" minlength" when =" dirty" >
130130 Min length is 5
131131 </div >
132132</div >
@@ -136,21 +136,21 @@ It also comes in array format for multiple rules:
136136
137137``` html
138138<input type =" text" formControlName =" username" >
139- <div nxgErrors =" username" >
140- <div [nxgError] =" minlength" [when] =" ['dirty', 'touched']" >
139+ <div ngxErrors =" username" >
140+ <div ngxError =" minlength" [when] =" ['dirty', 'touched']" >
141141 Min length is 5
142142 </div >
143143</div >
144144```
145145
146146### Dynamic errors
147147
148- You can optionally data-bind and dynamically create validation errors with nxgErrors :
148+ You can optionally data-bind and dynamically create validation errors with ngxErrors :
149149
150150``` html
151151<input type =" text" formControlName =" username" >
152- <div nxgErrors =" person.username" >
153- <div *ngFor =" let error of errors" [nxgError ] =" error.name" [when] =" error.rules" >
152+ <div ngxErrors =" person.username" >
153+ <div *ngFor =" let error of errors" [ngxError ] =" error.name" [when] =" error.rules" >
154154 {{ error.text }}
155155 </div >
156156</div >
@@ -170,13 +170,13 @@ export class MyComponent {
170170
171171### Nested FormGroup support
172172
173- nxgErrors also supports FormGroups with control names using dot notation:
173+ ngxErrors also supports FormGroups with control names using dot notation:
174174
175175``` html
176176<div formGroupName =" person" >
177177 <input type =" text" formControlName =" username" >
178- <div nxgErrors =" person.username" >
179- <div nxgError =" minlength" [when] =" ['dirty', 'touched']" >
178+ <div ngxErrors =" person.username" >
179+ <div ngxError =" minlength" [when] =" ['dirty', 'touched']" >
180180 Min length is 5
181181 </div >
182182 </div >
0 commit comments