Created
November 5, 2011 02:08
-
-
Save anonymous/1340987 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
$s = new Savant3(); | |
$f = $s->form('login'); | |
$f->depends('email_addr', 'password'); | |
$f->addValidation('email_addr', new Form_Validation('email', 'Please enter a valid email address')); | |
$f->addValidation('pass_confirm', new Form_Validation('confirm', 'Please confirm your password', array('against' => $f->password))); | |
if ($f->isSubmit() && $f->validate()) { | |
// handle login | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment