הראה קוד מקור ל reminders.validators

from __future__ import annotations

import re


[תיעוד] class ReminderValidator: # Allow common letters, whitespace, Hebrew, punctuation and basic symbols pattern = re.compile(r"^[\w\sא-ת\.\,\;\:\!\?\'\"\(\)\-\/\\]+$")
[תיעוד] def validate_text(self, text: str) -> bool: try: if not isinstance(text, str): return False if not text: return True if len(text) > 2000: return False return bool(self.pattern.match(text)) except Exception: return False