Commit 3474f628 authored by Rajkumar-D's avatar Rajkumar-D
Browse files

Allowint space in custom field

parent c939cf9d
Pipeline #195565 passed with stages
in 5 minutes and 28 seconds
......@@ -144,10 +144,11 @@
<!-- form for custom field validation. -->
<form #cf="ngForm">
<mat-form-field class="app-field-padding">
<!-- Pattern matching alphanumeric characters with "_", "-" and "space" in middle. -->
<input matInput placeholder="Add custom field" [(ngModel)]="customField"
pattern="^[A-Za-z0-9_-]*$" name="customField" #customText />
pattern="^[^_-\s][A-Za-z0-9_-\s]*[^_-\s]$" name="customField" #customText />
<mat-error *ngIf="cf.controls['customField']?.errors">
Alphanumeric charecters with _ and - are allowed.
Alphanumeric charecters with space, _ and - inbetween are allowed.
</mat-error>
</mat-form-field>
<mat-icon class=" app-primary-color addIcon" [disabled]="cf.invalid"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment