Add validation styling for approver widget
What does this MR do and why?
This merge request updates the error handling and display in the policy editor components for security orchestration. The main changes include:
- Moving error alerts from the ApproverAction component to the ActionSection component, which now displays errors related to specific actions.
- Updating the ApproverSelect component to filter and display errors specific to each action.
- Modifying the error validation logic to check for 'actions' field instead of 'approvers_ids'.
- Adjusting the tests to reflect these changes in error handling and display.
Overall, these changes improve the organization and specificity of error messages in the policy editor interface, making it easier for users to identify and address issues with their security policies.
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Description | UI |
|---|---|
| Alert positioning and validation styling | ![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Go to a Group/Project
- Secure -> Policies
- New approvals policy
- Type in name, select approvers action, set required to 2, and select only one aprroval type (group or user)
- Add another same action
- Create policy, check validation error
Related to #510675 (closed)
