Problem/Motivation

Component validation logic sees select field _none value to be a non-empty value.

screenshot showing _none value translates to non-empty condition.

Steps to reproduce

Debug step through foreach (_name_translations() as $key => $title) { in name_element_validate() to see the item components marked as filled for _none values.

Proposed resolution

Look at the component to determine the field type is <select>, and filter out _none values.

Issue fork name-3555879

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jcandan created an issue. See original summary.

jcandan’s picture

Issue summary: View changes
StatusFileSize
new76.08 KB
jcandan’s picture

The $empty = name_element_validate_is_empty($item); boolean later skips setting validation errors. However, stepping through, one can see the obvious logical error. This has caused issues with any potential logic changes necessary for #3552451: Required state incorrectly marks non-minimum components as required.

jcandan’s picture

Assigned: jcandan » Unassigned
Issue summary: View changes
Status: Active » Needs review

bluegeek9 made their first commit to this issue’s fork.

jcandan’s picture

bluegeek9 changed the visibility of the branch 8.x-1.x to hidden.

bluegeek9’s picture

Status: Needs review » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:
  • Triage issues and adding more context to existing issues.
  • Flagging Name Field as a favorite on the project page to help others discover it and show your support.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • bluegeek9 committed d3d9deb3 on 8.x-1.x authored by jcandan
    [#3555879] feat: Fix validation logical condition considers _none a non-...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.