Skip to content
This repository was archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
1.2.2 - fix wrong fail validate
Browse files Browse the repository at this point in the history
  • Loading branch information
Traineratwot committed Feb 5, 2024
1 parent 5e876e9 commit 4f35072
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/Rules/GeoPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ public function validate(string $attribute, mixed $value, Closure $fail): void
if (! is_numeric($point['latitude']) || ! is_numeric($point['longitude'])) {
$fail("The {$attribute} must be a valid geo point.");
}
if ($point['latitude'] < -90 || $point['latitude'] > 90) {
$fail("The {$attribute} must be a valid geo point.");
}
if ($point['longitude'] < -180 || $point['longitude'] > 180) {
$fail("The {$attribute} must be a valid geo point.");
}
} catch (Exception $e) {
$fail("The {$attribute} must be a valid geo point.");
}
Expand Down

0 comments on commit 4f35072

Please sign in to comment.