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

✏️ Fix validation parameter name in docs, from regex to pattern #10085

Merged
merged 2 commits into from Sep 2, 2023
Merged

✏️ Fix validation parameter name in docs, from regex to pattern #10085

merged 2 commits into from Sep 2, 2023

Conversation

pablodorrio
Copy link
Contributor

Currently the document states:

Validations specific for strings:

  • min_length
  • max_length
  • regex

But the parameter regex is deprecated so I change regex to pattern:

Validations specific for strings:

  • min_length
  • max_length
  • pattern

@tiangolo
Copy link
Owner

📝 Docs preview for commit 1b02e5c at: https://888ad06d.fastapitiangolo.pages.dev

@tiangolo
Copy link
Owner

📝 Docs preview for commit 5f2b470 at: https://c3aa6f6b.fastapitiangolo.pages.dev

@iudeen
Copy link
Contributor

iudeen commented Aug 22, 2023

Just to add more context: this PR aims to correct the documentation to align to the recent changes that Pydantic V2 has gone through.

Ref: https://docs.pydantic.dev/2.0/migration/#changes-to-pydanticfield

@tiangolo tiangolo changed the title fix(doc): change deprecated parameter regex to pattern ✏️ Fix validation parameter name in docs, from regex to pattern Sep 2, 2023
@tiangolo
Copy link
Owner

tiangolo commented Sep 2, 2023

Good catch, thanks @pablodorrio! 🚀

@tiangolo tiangolo merged commit c502197 into tiangolo:master Sep 2, 2023
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants