Cleanup and validate emails on push recipients
What does this MR do?
Validates max number of recipients: It introduces a limit for a max number of recipients. For now the limit is 750. If the number of addresses is higher than the limit, it shows an error message. (See #268207 (comment 505540508) for context of why 750)
Normalizes the recipients list on save: In order to count the recipients we need to clean up the list. For example Andy Soiron asoiron@example.com
should only count 1 email address even though it has 3 words. Duplicates are removed from the list in a case-insensitive way. For context why case-insensitive see !55588 (comment 523381019) and !55588 (comment 527103994)
Here is how the form will look like including the error message:
Related issue: #268207 (closed) the issue is confidential, but it was decided that this doesn't need a security MR.
Technical Writing
New texts:
- Error message: "Recipients max number is 750". This follows a pattern that the first word is the form field name.
- Help text for the recipients field: "Invalid email addresses and duplicates will be removed."
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because _____.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done