mirror of
https://github.com/marcogll/telegram_expenses_controller.git
synced 2026-01-13 21:35:15 +00:00
feat: Implement core application structure, AI extraction, persistence, and Telegram bot modules with updated configuration and dependencies.
This commit is contained in:
13
app/preprocessing/validators.py
Normal file
13
app/preprocessing/validators.py
Normal file
@@ -0,0 +1,13 @@
|
||||
"""
|
||||
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
|
||||
Reference in New Issue
Block a user