Closed (fixed)
Project:
Geofield
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
4 Dec 2012 at 11:57 UTC
Updated:
1 Jan 2013 at 17:50 UTC
Jump to comment: Most recent file
Some basic non-empty, required, and geometry validation checking.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | geofield-hook_validate-1857940-1.patch | 2.79 KB | alexrayu |
Comments
Comment #1
alexrayu commentedAttached geofield-hook_validate-1857940-1.patch
Comment #2
Brandonian commentedCommitted @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.
Comment #3
tito.brasolin commentedLine 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').
Comment #4
alexrayu commentedThat line should be
$error = geofield_validate_geom($item);Comment #5
Brandonian commentedFixed.
http://drupalcode.org/project/geofield.git/commit/705e925
Comment #6.0
(not verified) commentedFixed a typo