Problem/Motivation

When the geofield field is required and the "Hide Lat/Lon Coordinates Input" option is checked we lose the FE validation and receive the "This value should not be null." error which is non-informative enough.

Steps to reproduce

  • Create a required - "Geofield" type field;
  • Set the "Geofield Map" widget;
  • Enable the "Hide Lat/Lon Coordinates Input" option.
  • Go to the entity and try to save it.

Proposed resolution

Add the visual indicator to the fieldset to show that field is required when the lat and lon fields are hidden.

Comments

alt.dev created an issue. See original summary.

alt.dev’s picture

Issue summary: View changes
itamair’s picture

Title: No required indicator » Better Flagged error in case of Required Geofield (Map Widget) field

  • itamair committed 555e9f88 on 11.0.x
    [#3497016] fix: Better Flagged error in case of Required Geofield (Map...
itamair’s picture

Status: Active » Fixed

Thanks @alt.dev for highlighting all this.
This last commit: https://git.drupalcode.org/project/geofield_map/-/commit/555e9f88c6eb2fc...
solves this introducing a specific / dedicated error message with the following pattern:
No location has been set yet for required field "[field_geofiel_map_widget_label]".

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

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

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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