-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
This issue is automatically created based on existing pull request: #38179: Remove the "required" UI setting because it is not being used
This pull request removes the required UI setting because it is not being used.
The required node within the settings node was introduced in Magento 2.2.0 5affd8a#diff-8aee8246d682b388c846bcfd4c2b9191c18af2fa9fea845324805421d62b579f
It purposes was to define whether the rendered field is required. However, this functionality already covered by the validation setting. The required-entry rule node within the validation node determines whether the field is required or not.
For example,
<field name="name" sortOrder="10" formElement="input">
<settings>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
</settings>
</field>
We can refer to the initObservable and _setClasses functions in the Magento_Ui/js/form/element/abstract JS component located in the vendor/magento/module-ui/view/base/web/js/form/element/abstract.js file.
Since the required node within the settings node is not being used, it should be removed from the Magento codebase.
Description (*)
Related Pull Requests
N/A
Fixed Issues (if relevant)
N/A
Manual testing scenarios (*)
- ...
- ...
Questions or comments
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- All automated tests passed successfully (all builds are green)