Skip to content

Commit 0f1bb26

Browse files
author
Robby Rabbitman
committed
docs
1 parent 7507ca8 commit 0f1bb26

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

docs/src/content/docs/es/utilities/Forms/control-error.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,20 @@ Sin `NgxControlError`:
4040
</label>
4141
```
4242

43+
En un formulario también puedes pasar el nombre del control en lugar de la instancia.
44+
45+
```html
46+
<form [formGroup]="form">
47+
<label>
48+
<b>Nombre</b>
49+
<input type="text" formControlName="name" />
50+
<strong *ngxControlError="'name'; track: 'required'">
51+
Se requiere el nombre.
52+
</strong>
53+
</label>
54+
</form>
55+
```
56+
4357
## Configuración
4458

4559
Un `StateMatcher` define cuándo el control proporcionado está en un _estado de error_.

docs/src/content/docs/utilities/Forms/control-error.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,20 @@ without `NgxControlError`:
3838
</label>
3939
```
4040

41+
In a form you can also pass the name of the control instead of the instance.
42+
43+
```html
44+
<form [formGroup]="form">
45+
<label>
46+
<b>Name</b>
47+
<input type="text" formControlName="name" />
48+
<strong *ngxControlError="'name'; track: 'required'">
49+
Name is required.
50+
</strong>
51+
</label>
52+
</form>
53+
```
54+
4155
## Configuration
4256

4357
A `StateMatcher` defines when the provided control is in an _error state_.

0 commit comments

Comments
 (0)