xxxxxxxxxx
class Article(Base):
name = Column(Text, unique=True)
@validates('name')
def validate_name(self, key, value):
assert value != ''
return value
xxxxxxxxxx
class Article(Base):
name = Column(Text, CheckConstraint('name!=""')