Hi all, if you were trying to block all email addresses from being posted, except for ones that go to a certain domain, how would you do it please? This is what I’ve managed so far:
if ($user->data['user_posts'] < 100000) {
if (preg_match('/(@|\(at\))/i', request_var('message', '', true))) {
$error[] = $user->lang['NO_EMAILS'];
}
}
Sorry Chorn, I see I should have been clearer. So it would not allow any email addresses as per the existing code above, except if it was going to any email address at @testdomain.com
no no, i may have mentioned validating the syntax for an emailadress first - but at least i don’t know the context this info will be processed further or if some pre-check is previously made anyway.