I am working with drupal8 site.Here i want to override the default "The email address %mail is not valid" email format validation message.I have checked with hook_form_alter to implement this.But no result.Is it possible to alter this message?


For Drupal 8, Webform uses Drupal's default Email Form Element. You'll have to override this element info and add your own validation message there.

See https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21theme.api.php/function/hook_element_info_alter/8.5.x

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.