mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
added validation of not set value
This commit is contained in:
parent
759620d323
commit
60cd9b8d86
1 changed files with 5 additions and 0 deletions
|
|
@ -80,6 +80,11 @@ def validate_value_by_regexes(value, in_list):
|
|||
if "*" in in_list:
|
||||
return 0
|
||||
|
||||
# If value is not set and in list has specific values then resolve value
|
||||
# as not matching.
|
||||
if not value:
|
||||
return -1
|
||||
|
||||
regexes = compile_list_of_regexes(in_list)
|
||||
for regex in regexes:
|
||||
if re.match(regex, value):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue