Skip to content

Commit

Permalink
Stricter validation
Browse files Browse the repository at this point in the history
  • Loading branch information
the-infinity committed Jun 7, 2024
1 parent 1f23428 commit 968e553
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/parkapi_sources/models/parking_site_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ class StaticParkingSiteInput(BaseParkingSiteInput):
DefaultUnset,
)

lat: Decimal = NumericValidator(min_value=-90, max_value=90)
lon: Decimal = NumericValidator(min_value=-180, max_value=180)
# Set min/max to Europe borders
lat: Decimal = NumericValidator(min_value=34, max_value=72)
lon: Decimal = NumericValidator(min_value=-27, max_value=43)

capacity: OptionalUnsetNone[int] = Noneable(IntegerValidator(min_value=0, allow_strings=True)), DefaultUnset
capacity: int = Noneable(IntegerValidator(min_value=0, allow_strings=True)), DefaultUnset
capacity_disabled: OptionalUnsetNone[int] = Noneable(IntegerValidator(min_value=0, allow_strings=True)), DefaultUnset
capacity_woman: OptionalUnsetNone[int] = Noneable(IntegerValidator(min_value=0, allow_strings=True)), DefaultUnset
capacity_family: OptionalUnsetNone[int] = Noneable(IntegerValidator(min_value=0, allow_strings=True)), DefaultUnset
Expand Down

0 comments on commit 968e553

Please sign in to comment.