Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
3633 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
3
Des 19
10957
0
Mei 22
3696
4
Jun 21
7507
1
Jun 17
11440
3
Mar 15
9224