From 82525b42ee44dd9a189c76b71da831f6ba046d43 Mon Sep 17 00:00:00 2001 From: RemiZOffAlex Date: Mon, 29 Apr 2024 23:54:27 +0300 Subject: [PATCH] Update example --- example.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example.py b/example.py index 145cf6e..0a6390a 100755 --- a/example.py +++ b/example.py @@ -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)