Skip to content

Commit 823f725

Browse files
[DSC-2529] allow space in email pattern + trim on submit
1 parent cd2369d commit 823f725

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
252252
name: 'email',
253253
validators: {
254254
required: null,
255-
pattern: '^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$',
255+
pattern: '^\\s*[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}\\s*$',
256256
},
257257
required: true,
258258
errorMessages: {
@@ -367,7 +367,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
367367
},
368368
],
369369
},
370-
email: this.email.value,
370+
email: (this.email.value as string)?.trim(),
371371
canLogIn: this.canLogIn.value,
372372
requireCertificate: this.requireCertificate.value,
373373
};

0 commit comments

Comments
 (0)