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

Custom field regex validation always anchors to beginning of string #2489

Closed
gsnider2195 opened this issue Sep 26, 2022 · 0 comments · Fixed by #2699
Closed

Custom field regex validation always anchors to beginning of string #2489

gsnider2195 opened this issue Sep 26, 2022 · 0 comments · Fixed by #2699
Assignees
Labels
type: bug Something isn't working as expected

Comments

@gsnider2195
Copy link
Contributor

Environment

  • Nautobot version (Docker tag too if applicable): v1.5.0a0
  • Python version: 3.10.7
  • Database platform, version: Postgres 13
  • Middleware(s):

Steps to Reproduce

  1. Create a custom field with type Text and regex validation of string foo
  2. Update custom field on an object to barfoo

Expected Behavior

barfoo matches foo (regex is not anchored on beginning of line)

Observed Behavior

barfoo does not match foo because Nautobot is using re.match instead of re.search here and here

@gsnider2195 gsnider2195 added the type: bug Something isn't working as expected label Sep 26, 2022
@gsnider2195 gsnider2195 self-assigned this Oct 28, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant