Skip to Content
Menú
This question has been flagged
1 Respondre
3344 Vistes

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?

Avatar
Descartar
Best Answer

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

Avatar
Descartar
Related Posts Respostes Vistes Activitat
3
de des. 19
10502
0
de maig 22
3348
4
de juny 21
7121
1
de juny 17
10923
3
de març 15
8738