Validate vector coordinates.

This commit is contained in:
David Molineus
2016-10-06 09:52:07 +02:00
parent a6ffe76134
commit d7d76913b1
2 changed files with 24 additions and 1 deletions

View File

@@ -88,7 +88,24 @@ class Validator
}
foreach ($lines as $coordinate) {
LatLng::fromString($coordinate);
$this->validateCoordinates($coordinate);
}
return $values;
}
/**
* Validate multiple coordinate sets.
*
* @param mixed $values Given value.
*
* @return mixed
*/
public function validateMultipleCoordinateSets($values)
{
$sets = deserialize($values, true);
foreach ($sets as $lines) {
$this->validateMultipleCoordinates($lines);
}
return $values;