mirror of
https://github.com/marcogll/telegram_expenses_controller.git
synced 2026-01-13 13:25:15 +00:00
14 lines
314 B
Python
14 lines
314 B
Python
"""
|
|
Data validation functions.
|
|
"""
|
|
|
|
def is_valid_expense(data: dict) -> bool:
|
|
"""
|
|
Validates if the extracted data for an expense is plausible.
|
|
Stub function.
|
|
"""
|
|
# Example validation: amount must be positive
|
|
if "amount" in data and data["amount"] <= 0:
|
|
return False
|
|
return True
|