0
我有兩個問題,根據這部分代碼:多次實地驗證
$builder->add('password', 'repeated', [
'label' => 'Repeat password',
'type' => 'password',
'first_name' => 'password',
'second_name' => 'password2',
'error_bubbling' => true,
'invalid_message' => 'Password does not match']);
- 爲什麼我不斷收到「此值不能爲空」驗證錯誤?
我使用以下語法顯示這些驗證錯誤:
{{form_errors(形式)}}
是否有可能以分離單個字段錯誤?
什麼'error_bubbling'?無論如何,我不知道爲什麼你的代碼不工作,但我在這裏粘貼一段我的工作代碼:' - > add('password','repeated',array( 'type'=>'password ', 'invalid_message'=>'必須匹配!'))'此代碼正在工作,如果您複製粘貼它,但仍然沒有收到您的自定義無效消息...問題可能在另一個地方。 –