跳至内容
菜单
此问题已终结
1 回复
3325 查看

I have a field that is defined as:-

request_text = fields.Html('Incident Description', required=True)

and in the xml:-

<field name="request_text" widget="html" />​

But somehow the field is not mandatory in the form.

How do I make sure that the field is made mandatory and it is highlighted as mandatory in the form and the form shows validation error when it is submitted without filling this field?

形象
丢弃
最佳答案

Hi,

For the latest version the required attribute will work for html fields. So either in python side or in the xml side, you can set the required=True for the field.


Thanks

形象
丢弃
相关帖文 回复 查看 活动
3
12月 19
10479
0
5月 22
3326
4
6月 21
7100
1
6月 17
10891
3
3月 15
8714