Require E.164 phone numbers in twilio_call and clicksend_tts (#183993)

This commit is contained in:
Franck Nijhof
2026-10-02 14:02:32 +02:00
committed by GitHub
parent 473be3b6c8
commit 8c92a6a359
2 changed files with 2 additions and 2 deletions
@@ -46,7 +46,7 @@ PLATFORM_SCHEMA = NOTIFY_PLATFORM_SCHEMA.extend(
probatio.Required(CONF_USERNAME): cv.string,
probatio.Required(probatio.Secret(CONF_API_KEY)): cv.string,
probatio.Required(CONF_RECIPIENT): probatio.All(
cv.string, probatio.Match(r"^\+?[1-9]\d{1,14}$")
cv.string, probatio.E164(normalize=False)
),
probatio.Optional(CONF_LANGUAGE, default=DEFAULT_LANGUAGE): cv.string,
probatio.Optional(CONF_VOICE, default=DEFAULT_VOICE): probatio.In(
@@ -24,7 +24,7 @@ CONF_FROM_NUMBER = "from_number"
PLATFORM_SCHEMA = NOTIFY_PLATFORM_SCHEMA.extend(
{
probatio.Required(CONF_FROM_NUMBER): probatio.All(
cv.string, probatio.Match(r"^\+?[1-9]\d{1,14}$")
cv.string, probatio.E164(normalize=False)
)
}
)