Add validators for URL and keywords
This commit is contained in:
@@ -6,13 +6,15 @@
|
||||
<div class=" input-row">
|
||||
<mat-form-field appearance="standard" class="input">
|
||||
<mat-label>Vollständige URL des RSS-Feeds</mat-label>
|
||||
<input matInput formControlName="url" placeholder="https://rss.orf.at/news.xml" required>
|
||||
<input matInput type="url" formControlName="url" placeholder="https://rss.orf.at/news.xml" required>
|
||||
<mat-error *ngIf="feedForm.get('url').hasError('invalidURLFormat')">Geben Sie eine valide URL ein.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="input-row text-left">
|
||||
<mat-form-field appearance="standard" class="input">
|
||||
<mat-label>Gesuchte Stichwörter</mat-label>
|
||||
<mat-label>Gesuchte Stichworte</mat-label>
|
||||
<input matInput formControlName="keywords" placeholder="Spiel,Spaß,Schokolade" required>
|
||||
<mat-error *ngIf="feedForm.get('keywords').hasError('invalidKeywords')">Maximal 3 Wörter und jedes Wort mindestens 3 Zeichen</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-checkbox formControlName="match_all_keywords">Alle Stichworte müssen enthalten sein</mat-checkbox>
|
||||
</div>
|
||||
@@ -24,7 +26,7 @@
|
||||
<mat-error *ngIf="feedForm.get('icon').hasError('maxContentSize')">
|
||||
Die maximale Dateigröße ist {{feedForm.get('icon')?.getError('maxContentSize').maxSize | byteFormat}}
|
||||
({{feedForm.get('icon')?.getError('maxContentSize').actualSize
|
||||
| byteFormat}}).
|
||||
| byteFormat}})
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user