-
Notifications
You must be signed in to change notification settings - Fork 2
GeoLocation
Pieter Hordijk edited this page Dec 31, 2018
·
1 revision
Validates the input (numeric
) to be a valid latitude coordinate.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\GeoLocation\Latitude;
(new Latitude())->validate(12.3567);
-
Numeric.NumericType
when the validated value is not a numeric type -
GeoLocation.Latitude
when the validated value is not within the latitude range (-90 - 90 exclusive)
Validates the input (numeric
) to be within a valid latitude range of float
and float
.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\GeoLocation\LatitudeRange;
(new LatitudeRange(-12, 18.6428))->validate(12.3567);
-
Numeric.NumericType
when the validated value is not a numeric type -
GeoLocation.Latitude
when the validated value is not within the latitude range (-90 - 90 exclusive) -
Numeric.Minimum
when the validated value is less than the minimum value -
Numeric.Maximum
when the validated value is bigger than the maximum value
Validates the input (numeric
) to be a valid longitude coordinate.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\GeoLocation\Longitude;
(new Longitude())->validate(12.3567);
-
Numeric.NumericType
when the validated value is not a numeric type -
GeoLocation.Longitude
when the validated value is not within the latitude range (-180 - 180 exclusive)
Validates the input (numeric
) to be within a valid longitude range of float
and float
.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\GeoLocation\LongitudeRange;
(new LongitudeRange(-12, 18.6428))->validate(12.3567);
-
Numeric.NumericType
when the validated value is not a numeric type -
GeoLocation.Longitude
when the validated value is not within the longitude range (-180 - 180 exclusive) -
Numeric.Minimum
when the validated value is less than the minimum value -
Numeric.Maximum
when the validated value is bigger than the maximum value