

def unique_validator(self, key, column):
    '\n        Returns unique validator for given column if column has a unique index\n\n        :param key: String key of the column property\n        :param column: SQLAlchemy Column object\n        '
    if column.unique:
        return self.get_validator('unique', column=getattr(self.model_class, key), get_session=key.form_class.get_session)

dataset/ETHPy150Open kvesteri/wtforms-alchemy/wtforms_alchemy/generator.py FormGenerator.unique_validator/VarMisuse@43/117 `self`->`key`