mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Add rules to input
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -137,6 +137,8 @@ export class NewPublicationPage implements OnInit {
|
||||
]),
|
||||
Message: new FormControl(this.pub.Message, [
|
||||
// Validators.required
|
||||
Validators.maxLength(500)
|
||||
|
||||
])
|
||||
})
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="ion-icon-class" >
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -142,6 +142,10 @@ export class NewPublicationPage implements OnInit {
|
||||
Subject: new FormControl(this.pub.Title, [
|
||||
Validators.required,
|
||||
// Validators.minLength(4)
|
||||
]),
|
||||
Message: new FormControl(this.pub.Message, [
|
||||
// Validators.required
|
||||
Validators.maxLength(1000)
|
||||
])
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user