Skip to content

Length() schema validator does not interpolate #356

@jenstroeger

Description

@jenstroeger

It looks like

min_err = _(self.min_err, mapping={'min': self.min})
raise Invalid(node, min_err)

should actually be

min_err = _(self.min_err, mapping={'min': self.min}).interpolate()
raise Invalid(node, min_err)

and likewise with max_error below. Otherwise the raised Invalid() exception will contain

Longer than maximum length ${max}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions