MCPcopy Index your code
hub / github.com/JoshData/python-email-validator / get_length_reason

Function get_length_reason

email_validator/syntax.py:201–205  ·  view source on GitHub ↗

Helper function to return an error message related to invalid length.

(addr: str, limit: int)

Source from the content-addressed store, hash-verified

199
200
201def get_length_reason(addr: str, limit: int) -> str:
202 """Helper function to return an error message related to invalid length."""
203 diff = len(addr) - limit
204 suffix = "s" if diff > 1 else ""
205 return f"({diff} character{suffix} too many)"
206
207
208def safe_character_display(c: str) -> str:

Callers 3

validate_email_lengthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected