From c3e034f16149fc52c46280dbf257d6a25ead9c4b Mon Sep 17 00:00:00 2001 From: David Molineus Date: Tue, 14 Nov 2017 09:54:33 +0100 Subject: [PATCH] Fix the validator. --- src/GeocodeWidget.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/GeocodeWidget.php b/src/GeocodeWidget.php index 9665504..e0da0d8 100644 --- a/src/GeocodeWidget.php +++ b/src/GeocodeWidget.php @@ -65,6 +65,14 @@ class GeocodeWidget extends \Widget return $value; } + if (is_array($value)) { + foreach ($value as $key => $val) { + $value[$key] = $this->validator($val); + } + + return $value; + } + // See: http://stackoverflow.com/a/18690202 if (!preg_match( '#^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)(,[-+]?\d+)?$#',