IMO the best is to use both javascript validation (its very fast in order to avoid wrong mails accidentaly) and php validation for security.
And you could try this ;)...