Disable form submit when validation fails
What does this MR do and why?
- Refactor action validation
- Validation is required for both modes -> rule and yaml
- Validation is transferred to parent component
- It is debounced in order to avoid API call on every key type
- Api file check is replaced with GrapqhQl query
- action_Section is now more stateless, validation was removed, replaced with property
- New tests were added
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 |
---|---|
Existing policy | existing policy.mov |
New policy | new policy.mov |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Enable feature flag
Feature.enable(:pipeline_execution_policy_type)
- Go to Group/Projects
- Secure -> Polices
- New policy -> Pipeline Execution policy
- Select project and type in wrong file name
- When validation fails check that form submit is disabled
Related to #467673 (closed)
Edited by Artur Fedorov