-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
I am not very experienced with peewee_validates, I was reading through the documentation and couldn't fully understand validation inside a model class, it seems you can only apply a validator to the whole class, is it possible to inside a model call to apply a validator to just one field? particularly a validate_email?
`class User(Model):
name = CharField(max_length=60)
address = CharField()
email = CharField(validator=validate_email())
billing = CharField()
class Meta:
constraints = [SQL('UNIQUE("name" COLLATE NOCASE, "email" COLLATE NOCASE)')]
database = db`
something like that to maybe combine with constraints?
I am sorry if it is a stupid question, I am still studying how to use databases.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels