Skip to content

Commit 85e9602

Browse files
FrancescoMolinarovins01-4science
authored andcommitted
Merged in task/dspace-cris-2023_02_x/DSC-2529 (pull request DSpace#3623)
[DSC-2529] allow space in email pattern + trim on submit Approved-by: Andrea Barbasso
2 parents dcdb4d4 + db6441d commit 85e9602

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)