mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Add rules to input
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-textarea-class">
|
<div class="ion-textarea-class" [class.input-error]="Form?.get('Message')?.invalid && validateFrom ">
|
||||||
<ion-textarea [(ngModel)]="pub.Message" name="description" ngDefaultControl rows="12" cols="20" placeholder="Corpo de texto..."></ion-textarea>
|
<ion-textarea [(ngModel)]="pub.Message" name="description" ngDefaultControl rows="12" cols="20" placeholder="Corpo de texto..."></ion-textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -137,6 +137,8 @@ export class NewPublicationPage implements OnInit {
|
|||||||
]),
|
]),
|
||||||
Message: new FormControl(this.pub.Message, [
|
Message: new FormControl(this.pub.Message, [
|
||||||
// Validators.required
|
// Validators.required
|
||||||
|
Validators.maxLength(500)
|
||||||
|
|
||||||
])
|
])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<div class="ion-icon-class" >
|
<div class="ion-icon-class" >
|
||||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-textarea-class flex-grow-1">
|
<div class="ion-textarea-class flex-grow-1" [class.input-error]="Form?.get('Message')?.invalid && validateFrom ">
|
||||||
<ion-textarea [(ngModel)]="pub.Message" name="description" ngDefaultControl rows="12" cols="20" placeholder="Corpo de texto..."></ion-textarea>
|
<ion-textarea [(ngModel)]="pub.Message" name="description" ngDefaultControl rows="12" cols="20" placeholder="Corpo de texto..."></ion-textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -142,6 +142,10 @@ export class NewPublicationPage implements OnInit {
|
|||||||
Subject: new FormControl(this.pub.Title, [
|
Subject: new FormControl(this.pub.Title, [
|
||||||
Validators.required,
|
Validators.required,
|
||||||
// Validators.minLength(4)
|
// Validators.minLength(4)
|
||||||
|
]),
|
||||||
|
Message: new FormControl(this.pub.Message, [
|
||||||
|
// Validators.required
|
||||||
|
Validators.maxLength(1000)
|
||||||
])
|
])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user