Add an option to make an attribute required

Created on 7 February 2025, 2 months ago

Problem/Motivation

In specific cases - i.e. when using Drupal in a headless system -, setting a target may be required as not doing so might result in invalid HTML (like an empty target attribute) if the consuming frontend doesn't check values.
Thus, making the selection of a target required on the CMS is a solution to force the editor to make a choice.

Steps to reproduce

N/A

Proposed resolution

Add an option to specify what attributes must be required.

Remaining tasks

Create MR
Review MR
Merge MR

User interface changes

Extra option to make an attribute required.

API changes

None.

Data model changes

An attribute can be set required.

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇧🇪Belgium tim-diels Belgium 🇧🇪

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @tim-diels
  • Merge request !24Allow to set attributes required → (Open) created by tim-diels
  • 🇧🇪Belgium tim-diels Belgium 🇧🇪

    I've added the option to set attributes required. But for some reason the empty option is still there. Can't really find out if this module is responsible for that or it's something else.

  • Pipeline finished with Failed
    2 months ago
    Total: 172s
    #417960
  • Pipeline finished with Failed
    2 months ago
    Total: 182s
    #418145
  • Pipeline finished with Failed
    2 months ago
    Total: 181s
    #418154
  • Pipeline finished with Success
    2 months ago
    Total: 250s
    #418175
  • 🇧🇪Belgium tim-diels Belgium 🇧🇪

    This will need work to provide test coverage for the required options.

Production build 0.71.5 2024