Skip to content

EditTable validation #673

Description

@berycz

from discord

Bery
I found a bug in EditTable - create_form/edit_form
if you have some fields required or with any validators, on bind they get validated form.py#L914 - which sets errors, because iommi_path is "wrong", so the value is None (invalid)
plus it should not probably call post_validation on bind
and _valid=False bubbles to parent_form._valid and because of this form.py#L1951 the parent_form.is_valid() returns False even tho everything was ok

so, the best thing would be not to validate creat_form/edit_form on bind, but how? 🤔

or, actually, the best thing would be to somehow take the validation from edit_table__post_handler and do it on bind, but that's even harder I guess

boxed
I guess one could have a hook point for validation on the form level, so that when edit table creates those forms it can specify a specific global validator that skips validation of the fields

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions