我正在使用laravel 5.2。我的頁面包含字段密碼和確認密碼。我想檢查密碼和確認密碼是否相等。下面給出的是我的查看頁面部分。另外,我想知道如何驗證密碼並確認密碼?如何驗證密碼和確認密碼是否相等?
<div class="col-sm-12">
<div class="form-group">
<label class="col-md-2 control-label">Password</label>
<div class="col-md-6">
<input type="password" class="form-control" placeholder="Enter Your Password" name="password" id="password" data-parsley-trigger="change" data-parsley-required="true" data-parsley-equalto="#password" data-parsley-minlength="6" data-parsley-maxlength="14" required>
{!! $errors->first('password', '<label class="control-label" for="password">:message</label>')!!}
</div>
</div>
</div>
<div class="col-sm-12">
<div class="form-group">
<label class="col-md-2 control-label">Confirm Password</label>
<div class="col-md-6">
<input type="password" class="form-control" placeholder="Please Confirm Your Password" name="password_confirmation" id="password_confirmation" data-parsley-trigger="change" data-parsley-required="true" data-parsley-equalto="#password" data-parsley-minlength="6" data-parsley-maxlength="14" required>
</div>
</div>
</div>