Skip to content

Commit

Permalink
EPMRPP-96328 || Impossible to save Notification rule when user has a …
Browse files Browse the repository at this point in the history
…dot in username
  • Loading branch information
maria-hambardzumian committed Oct 29, 2024
1 parent 9d300cf commit a19323c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/common/utils/validation/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const createNotificationRecipientsValidator = (informOwner) => (value = [
if (informOwner && !value.length) {
return true;
}
const checkIsStringWithEmailParts = regex(/[.@]/);
const checkIsStringWithEmailParts = regex(/@/);
if (value.some(checkIsStringWithEmailParts)) {
return value.filter(checkIsStringWithEmailParts).every(email);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const RecipientsContainerComponent = ({ projectInfo, error, ...rest }) => {
const [recipientsWithError, setRecipientsWithError] = useState([]);

const emailValidation = (email) => {
return regex(/[.@]/)(email);
return regex(/@/)(email);
};

const getEmailValidationError = (v) => {
Expand Down

0 comments on commit a19323c

Please sign in to comment.