验证密码
不用js,怎么去判断两次输入的密码不正确?
赵狗胜 回复了问题 • 4 人关注 • 5 个回复 • 2842 次浏览 • 2015-05-06 15:21
这是我项目中的部分片段,希望能够帮助到你。如下:
{{{
//
$rules = array(
'Username' => 'required|alpha_dash|min:6|max:18|unique:users,username'... 显示全部 »
{{{
//
$rules = array(
'Username' => 'required|alpha_dash|min:6|max:18|unique:users,username'... 显示全部 »
这是我项目中的部分片段,希望能够帮助到你。如下:
{{{
//
$rules = array(
'Username' => 'required|alpha_dash|min:6|max:18|unique:users,username',
'EmailAddress' => 'required|email|unique:users,email',
'Password' => 'required|min:8|max:18|confirmed|different:Username',
'Password_confirmation'=>'required'
);
$validator = Validator::make(Input::all(),$rules);
if ($validator->fails())
{
Session::flash('old',Input::only('Username','EmailAddress'));
return Redirect::to('join')->withErrors($validator);
}
}}}
{{{
//
$rules = array(
'Username' => 'required|alpha_dash|min:6|max:18|unique:users,username',
'EmailAddress' => 'required|email|unique:users,email',
'Password' => 'required|min:8|max:18|confirmed|different:Username',
'Password_confirmation'=>'required'
);
$validator = Validator::make(Input::all(),$rules);
if ($validator->fails())
{
Session::flash('old',Input::only('Username','EmailAddress'));
return Redirect::to('join')->withErrors($validator);
}
}}}