Skip to content
Snippets Groups Projects
Commit 8ae08690 authored by Matt's avatar Matt Committed by saranya ashokkumar
Browse files

Issue #3164517 by Anas_maw, MattDanger, urvashi_vora, Ranjit1032002: Form...

Issue #3164517 by Anas_maw, MattDanger, urvashi_vora, Ranjit1032002: Form email validation will not working properly when tokens are used
parent 05873e26
No related branches found
No related tags found
No related merge requests found
......@@ -173,7 +173,11 @@ class WorkflowNotificationForm extends EntityForm {
if ($form_values['when_to_trigger'] == 'on_state_change') {
$form_state->setValue('days', 0);
}
if (!empty($mailids = $form_values['mail_ids'])) {
$mailids = $form_values['mail_ids'];
$tokens = \Drupal::moduleHandler()->moduleExists('token')
? \Drupal::token()->scan($mailids)
: FALSE;
if (!empty($mailids) && empty($tokens)) {
$values = "\r\n" . $mailids;
$ids = array_filter(preg_split('/\r\n|[\r\n]/', $values));
foreach ($ids as $k => $id) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment