Skip to content

Form validation: require at least one attribute

What does this MR do and why?

Form validation: require at least one attribute

Require at least one attribute in order to save a category

References

Screenshots or screen recordings

Before After
Screenshot_2025-10-20_at_15.16.51
required fields: name, selection type
Screenshot_2025-10-20_at_15.16.41
required fields: name, selection type, at least one attribute

How to set up and validate locally

git checkout mfluharty-require-at-least-one-attribute-to-save-a-category
echo "Feature.enable(:security_categories_and_attributes)" | gdk rails c
echo "Feature.enable(:security_context_labels)" | gdk rails c
  1. navigate to a group where you are at least a maintainer => Secure => Security configuration
  2. try to create a new blank category, you should be unable to save the category when it has 0 attributes

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Miranda Fluharty

Merge request reports

Loading