问题描述
我有包含下面的 ChoiceType 的跟随表单,在选项中我有值和翻译,就像这样“'-- الاختيار--' =>'app.ui.no_order'”,但每次我提交的表单在我看来是错误的
->add('type',ChoiceType::class,[
'choices' => $choices = [
'-- الاختيار--' =>'app.ui.no_order','In Stock' => true,'Out of Stock' => false,],'invalid_message' => '"{{ value }}" is not valid. Valid choices: {{ choices }}.','invalid_message_parameters' => [
'{{ choices }}' => implode(',',$choices),])
错误: {{ value }}”无效。有效选择:{{choices }},“-- الاختيار--”无效。有效选择:app.ui.no_order,1,.
是否有任何其他方法可以将翻译文本分配给选择类型并无误地提交。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)