mirror of
https://github.com/home-assistant/core
synced 2024-09-12 15:16:21 +02:00
Added regexp validation allowing Twilio notifications to use Sender ID instead of phone number (#19644)
* Added regexp validation allowing Twilio notifications to use Sender ID instead of phone number * Fix line length
This commit is contained in:
parent
6d44245456
commit
18d36e011a
@ -21,7 +21,10 @@ CONF_FROM_NUMBER = "from_number"
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.Required(CONF_FROM_NUMBER):
|
||||
vol.All(cv.string, vol.Match(r"^\+?[1-9]\d{1,14}$")),
|
||||
vol.All(cv.string,
|
||||
vol.Match(r"^\+?[1-9]\d{1,14}$|"
|
||||
r"^(?=.{1,11}$)[a-zA-Z0-9\s]*"
|
||||
r"[a-zA-Z][a-zA-Z0-9\s]*$")),
|
||||
})
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user