Last active
August 29, 2015 14:11
-
-
Save shinigamicorei7/5c34ff96683e4126ed2d to your computer and use it in GitHub Desktop.
Validación del formulario de registro
This file contains hidden or 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
public function create() { | |
$input = Input::except('_token'); | |
$rules = [ | |
'firstname' => 'required', | |
'lastname' => 'required', | |
'email' => 'required|email|unique:usuario,email_usr', | |
'password' => 'required|min:8|confirmed', | |
'password_confirmation' => 'required', | |
]; | |
$v = Validator::make($input, $rules); | |
if ($v->fails()) { | |
return Redirect::route('register')->withErrors($v)->withInput(Input::only('firstname', 'lastname', 'email', 'password')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment