

def length_validator(self, column):
    '\n        Returns length validator for given column\n\n        :param column: SQLAlchemy Column object\n        '
    if (isinstance(column.type, sa.types.String) and hasattr(column.type, 'length') and column.type.length):
        return self.get_validator('length', max=column.type.length)

dataset/ETHPy150Open kvesteri/wtforms-alchemy/wtforms_alchemy/generator.py FormGenerator.length_validator/original