Update example
This commit is contained in:
@@ -5,7 +5,7 @@ __email__ = 'remizoffalex@mail.ru'
|
||||
|
||||
import logging
|
||||
|
||||
from validator.core import Validator
|
||||
from validator.core import Validator, Error
|
||||
from validator.presets.common import EqualTo, MinLength
|
||||
|
||||
|
||||
@@ -19,6 +19,6 @@ validator = Validator([
|
||||
result = validator(password)
|
||||
print(result)
|
||||
|
||||
if result.status is False:
|
||||
if isinstance(result, Error):
|
||||
logging.error(result.message)
|
||||
raise ValueError(result.message)
|
||||
|
||||
Reference in New Issue
Block a user