Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic skeleton validation #1260

Open
phorward opened this issue Sep 19, 2024 · 1 comment
Open

Dynamic skeleton validation #1260

phorward opened this issue Sep 19, 2024 · 1 comment
Labels
discussion These topics must be discussed before completion

Comments

@phorward
Copy link
Member

Theoretical scribble as an idea?

class TodoSkel(skeleton.Skeleton):

    name = StringBone(
        descr="Name",
    )

    status = SelectBone(
        descr="Status",
        required=True,
        defaultValue="open",
        values={
            "open": "Offen",
            "pending": "In Bearbeitung",
            "closed": "Geschlossen",
        },
    )

    test = StringBone(
        descr="Test",
        required=""" name == "Jan" """,
        validate=("None if len(test) > 10 else 'Too short'", re.compile(r"ab.*")),
        readonly=""" status == "open" """,
        visible=""" status in ("pending", "closed") """,
    )
@phorward phorward added discussion These topics must be discussed before completion viur-meeting Issues to discuss in the next ViUR meeting labels Sep 19, 2024
@phorward
Copy link
Member Author

Relates to #1207

@phorward phorward removed the viur-meeting Issues to discuss in the next ViUR meeting label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion These topics must be discussed before completion
Projects
None yet
Development

No branches or pull requests

1 participant