cambios en el aspecto. Validators en el formulario de evento.
This commit is contained in:
@@ -10,8 +10,12 @@
|
||||
<ion-item>
|
||||
<label>
|
||||
Nombre del evento:
|
||||
<input type="text" formControlName = "nombre">
|
||||
<input type="text" id="nombre" formControlName = "nombre">
|
||||
</label>
|
||||
<span
|
||||
*ngIf="nombre.errors.required && (nombre.touched||submitted)">
|
||||
Tu evento necesita un nombre
|
||||
</span>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
@@ -19,6 +23,10 @@
|
||||
Fecha:
|
||||
<ion-datetime displayFormat="DD/MM, HH:mm"placeholder="Elegir Fecha" formControlName="fecha"></ion-datetime>
|
||||
</label>
|
||||
<span
|
||||
*ngIf="fecha.errors.required && submitted">
|
||||
Tu evento necesita una fecha
|
||||
</span>
|
||||
</ion-item>
|
||||
|
||||
|
||||
@@ -27,6 +35,10 @@
|
||||
Precio:
|
||||
<input type="number" formControlName = "precio1"><label>, </label><input type="number" formControlName = "precio2">
|
||||
</label>
|
||||
<span
|
||||
*ngIf="precio1.errors.required && (precio1.touched||submitted)">
|
||||
Tu evento necesita un precio (puede ser 0)
|
||||
</span>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
@@ -34,6 +46,10 @@
|
||||
Descripción:
|
||||
<textarea formControlName = "descripcion" rows="10"></textarea>
|
||||
</label>
|
||||
<span
|
||||
*ngIf="descripcion.errors.required && (descripcion.touched||submitted)">
|
||||
¡Dale una descripción a tu evento!
|
||||
</span>
|
||||
</ion-item>
|
||||
|
||||
<button type="submit">GUARDAR</button>
|
||||
|
||||
Reference in New Issue
Block a user