Created
December 21, 2014 00:02
-
-
Save schleumer/5d58f25928a7e1461c2f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
if (empty($_POST["name"])) { | |
throw new UserRegistrationException("Your name cannot be empty."); | |
} | |
if (filter_var($_POST["email"])) { | |
throw new UserRegistrationException("Invalid email"); | |
} | |
} catch (UserRegistrationException $e) { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment