Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save nextab/8b3982408136681301b89ec8bab6cd1a to your computer and use it in GitHub Desktop.

Select an option

Save nextab/8b3982408136681301b89ec8bab6cd1a to your computer and use it in GitHub Desktop.
#region Check e-mail regex
function jet_fb_v_nxt_check_email_regex( $value, $context ): bool {
$pattern = "/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/";
if (preg_match($pattern, $value)) return true;
return false;
}
#endregion Check e-mail regex

ghost commented Nov 2, 2023

Copy link
Copy Markdown

Warum nicht einfach is_email()? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment