mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Pattern key not working
This commit is contained in:
parent
9eb9ec1804
commit
574b01bcf4
1 changed files with 1 additions and 1 deletions
|
@ -2876,7 +2876,7 @@ class YunoHostArgumentFormatParser(object):
|
||||||
if question.value is not None:
|
if question.value is not None:
|
||||||
if question.choices and question.value not in question.choices:
|
if question.choices and question.value not in question.choices:
|
||||||
self._raise_invalid_answer(question)
|
self._raise_invalid_answer(question)
|
||||||
if question.pattern and re.match(question.pattern['regexp'], str(question.value)):
|
if question.pattern and not re.match(question.pattern['regexp'], str(question.value)):
|
||||||
raise YunohostValidationError(
|
raise YunohostValidationError(
|
||||||
question.pattern['error'],
|
question.pattern['error'],
|
||||||
name=question.name,
|
name=question.name,
|
||||||
|
|
Loading…
Add table
Reference in a new issue