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

[BUG] Indexed unique will not work after Field regex. #919

Closed
hgalytoby opened this issue Apr 19, 2024 · 2 comments
Closed

[BUG] Indexed unique will not work after Field regex. #919

hgalytoby opened this issue Apr 19, 2024 · 2 comments
Labels

Comments

@hgalytoby
Copy link

Describe the bug
Indexed unique will not work after Field regex.

To Reproduce

not work

class RegexTest(Document):
    val: Indexed(str, unique=True) = Field(regex=r"^[a-zA-Z0-9]+$")


await RegexTest(val='123').create()
await RegexTest(val='123').create()

work

class RegexTest(Document):
    val: Indexed(str, unique=True) = Field()


await RegexTest(val='123').create()
await RegexTest(val='123').create()
Copy link

This issue is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the Stale label May 20, 2024
Copy link

github-actions bot commented Jun 3, 2024

This issue was closed because it has been stalled for 14 days with no activity.

@github-actions github-actions bot closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant