Skip to content

Disable form submit when validation fails

What does this MR do and why?

  1. Refactor action validation
  2. Validation is required for both modes -> rule and yaml
  3. Validation is transferred to parent component
  4. It is debounced in order to avoid API call on every key type
  5. Api file check is replaced with GrapqhQl query
  6. action_Section is now more stateless, validation was removed, replaced with property
  7. 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)
  1. Go to Group/Projects
  2. Secure -> Polices
  3. New policy -> Pipeline Execution policy
  4. Select project and type in wrong file name
  5. When validation fails check that form submit is disabled

Related to #467673 (closed)

Edited by Artur Fedorov

Merge request reports