Skip to content
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.

Add length validate methods #67

Closed
rossmacarthur opened this issue Jan 25, 2019 · 0 comments
Closed

Add length validate methods #67

rossmacarthur opened this issue Jan 25, 2019 · 0 comments
Labels
feature New feature or request

Comments

@rossmacarthur
Copy link
Owner

Example

from serde import Model, fields, validate

class Example(Model):
    a = fields.Field(validators=[validate.length(10)])
    b = fields.Field(validators=[validate.length_between(10, 20, inclusive=False)])
    c = fields.Field(validators=[validate.length_min(10, inclusive=True)])
    d = fields.Field(validators=[validate.length_max(10)])
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant