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

feat Add charset for StringBone #1141

Conversation

@ArneGudermann ArneGudermann added the Priority: Low This issue can be considered with enough idle time. label Apr 11, 2024
@ArneGudermann ArneGudermann added this to the ViUR-core v3.7 milestone Apr 11, 2024
src/viur/core/bones/string.py Outdated Show resolved Hide resolved
Co-authored-by: Sven Eberth <mail@sveneberth.de>
Copy link
Member

@phorward phorward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there... I'm a little unhappy with this extension, because it can also be simply resolved using a vfunc-lambda, like this:

blah = StringBone(
    required=True,
    descr="Blah",
    vfunc=lambda value:
        "Not all letters are available in the charset"
        if any(char not in "abcdefg" for char in value)
        else None,
)

We should discuss about this.

@phorward phorward added the viur-meeting Issues to discuss in the next ViUR meeting label Apr 29, 2024
@phorward
Copy link
Member

This should be solved differently: Provide some helper functions in StringBone which can be inserted as vfuncs.

@sveneberth sveneberth removed the viur-meeting Issues to discuss in the next ViUR meeting label May 24, 2024
@phorward
Copy link
Member

Substituted by #1183

@phorward phorward closed this Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low This issue can be considered with enough idle time.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants