Some basic non-empty, required, and geometry validation checking.

CommentFileSizeAuthor
#1 geofield-hook_validate-1857940-1.patch2.79 KBalexrayu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexrayu’s picture

Attached geofield-hook_validate-1857940-1.patch

Brandonian’s picture

Status: Patch (to be ported) » Active

Committed @arayu's patch from #1. Thanks a bunch!

http://drupalcode.org/project/geofield.git/commit/796f6b6

Keeping the ticket open, because this needs a followup. Our backend plugin system allows for plugins to define field validation callbacks. Once we've finished our base validation, we should expose a callback for the plugin to followup for any plugin specific validation.

tito.brasolin’s picture

Line 180 looks strange to me: what if $items[0] is a WKT string? E.g. 'POLYGON ((19.4677...'

Function geofield_validate_geom will try and call geofield_compute_values with parameters ('P', 'P').

alexrayu’s picture

That line should be $error = geofield_validate_geom($item);

Brandonian’s picture

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Fixed a typo