Fix template text component length check (#5881)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
This commit is contained in:
Fabio Pugliese Ornellas 2023-12-05 04:17:43 +00:00 committed by GitHub
parent 1d0fb59208
commit 7fd08fb816
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,8 +39,8 @@ def validate(config):
) )
with cv.prepend_path(CONF_MIN_LENGTH): with cv.prepend_path(CONF_MIN_LENGTH):
if config[CONF_MIN_LENGTH] >= config[CONF_MAX_LENGTH]: if config[CONF_MIN_LENGTH] > config[CONF_MAX_LENGTH]:
raise cv.Invalid("min_length must be less than max_length") raise cv.Invalid("min_length must be less than or equal to max_length")
return config return config