marshmallow-code/marshmallow

Wrong value in __call__() function of validate.Validator

nevidomyyb opened this issue · 1 comments

I have some custom validators classes in my project, most of them works well but i have this one that gonna be used to on pbkdf2_sha256 hashed values and his "value" param in call method is getting the wrong value.
I use this code to test the value:

from marshmallow import ValidationError, validate
from passlib.hash import pbkdf2_sha256
from marshmallow.exceptions import ValidationError

class ExistenteCriptografado(validate.Validator):
    def __init__(self, model):
        self.model = model

    def __call__(self, value):
        print(value)

The output is supposed to be something like:
$pbkdf2-sha256$29000$ek4e3iEwOWcnf5dohJ/il....
But i am getting a String:
13323321111211

Sorry guys, i am so dumb that i was trying to get the value from database when actually my code validate the json incoming data.