dspace-angular
dspace-angular copied to clipboard
Fixed email pattern to allow emails TLDs with more than 4 characters
Hi @tdonohue, I'm @jtimal partner. We have been working on this issue and we will send you the PR.
References
- Fixes #2586
Description
I changed the email validation pattern on 4 components. This validation pattern is a version of HTML5 pattern that request user to use a email "[email protected]" style and to add at least one LTD.
Instructions for Reviewers
- Start a new ePerson register
- Introduce a valid email
List of changes in this PR:
- Changed email validation pattern
Checklist
- [x] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
- [x] My PR passes ESLint validation using
yarn lint - [x] My PR doesn't introduce circular dependencies (verified via
yarn check-circ-deps) - [x] My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
- [x] My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
- [x] If my PR includes new libraries/dependencies (in
package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation. - [x] If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
- [x] If my PR fixes an issue ticket, I've linked them together.
Hi @oscar-escire, Conflicts have been detected against the base branch. Please resolve these conflicts as soon as you can. Thanks!
Somehow this PR got "out of sync" in GitHub and wasn't showing the commit that was added. So, I've briefly changed its base branch to main & then back to dspace-7_x. That appears to have fixed the odd display issue I was seeing in GitHub.
We have tested and worked for us.
Before this PR it indeed does not allow for an LTD longer than 4 chars.
Using this PR:
Hi @tdonohue, I updated the branch, based on the comments, I changed the current form pattern to the old one and moved it to a file with the patterns prefix for the forms. I hope these changes are what you expected
H! @tdonohue, I submitted a fix for the email pattern, the previously pattern fails on validate ("^[a-zA-Z0-9.!#$%&'+/=?^_`{|}~-]+@a-zA-Z0-9?(?:.a-zA-Z0-9?)$") emails as 'test@test' i verified this on demo page, i don't know why the pattern pass the unit tests.