cancel
Showing results for 
Search instead for 
Did you mean: 

How to make the title required in xml file

How to make the title required in xml file

In the part admin grid Add button form. I want to make the title field Required.

 

 <block class="Magento\Backend\Block\Widget\Grid\Column" as="title">
    <arguments>
        <argument name="header" xsi:type="string" translate="true">            Title
        </argument>
        <argument name="index" xsi:type="string">title</argument>
    </arguments>
</block>

 

1 REPLY 1

Re: How to make the title required in xml file

Hi @ahmed_chouihi 


Try the required class

<arguments>
    <argument name="required-entry" xsi:type="boolean">true</argument>
</arguments>


For more info:
https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-instructions.html

I hope it will help you!