Skip to content

Required taxonomy fields doesn't present invalid state consistently with other fields #17437

Closed
@xtomas

Description

@xtomas

Describe the bug

When taxonomy fields are added into content type and required property is set to true, then backend validation occurs and model state error is added into errors. But the error is not correctly bound to the model property, but on the root of the model. So the UI shows error only in validation summary and not under each taxonomy field.

Orchard Core version

2.1.4 but I believe it is from the begging of the taxonomy module.

To Reproduce

  1. Enable taxonomy feature
  2. Create new content type for taxonomy item
  3. Create new taxonomy using taxonomy item type
  4. Add 2 items into new taxonomy
  5. Create new content type and add 3 taxonomy fields with  required settings each with different display settings: one unique with standard view for radio buttons, second with multiple choice and standard view for checkboxes, third with multiple and tags view
  6. Create new instance of content type with 3 taxonomy fields and send it without settings any taxonomy item
  7. There will be errors in summary but not below the each taxonomy fields. And there is no red border showing that the field is in error state like it is done i other content fields.

Expected behavior

Expected behavior is to show validation error message for each invalid taxonomy field and also there should be red border showing invalid state.

Logs and screenshots

Current state after doing repro steps

Image

Expected behavior

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions