Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
tiangolo merged 2 commits into
fastapi:masterfrom
pablodorrio:change-deprecated-parameter
Sep 2, 2023
Merged

✏️ Fix validation parameter name in docs, from regex to pattern#10085
tiangolo merged 2 commits into
fastapi:masterfrom
pablodorrio:change-deprecated-parameter

Conversation

@pablodorrio

Copy link
Copy Markdown
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
Copy Markdown
Member

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

@tiangolo

Copy link
Copy Markdown
Member

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

@iudeen

iudeen commented Aug 22, 2023

Copy link
Copy Markdown
Contributor

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

tiangolo commented Sep 2, 2023

Copy link
Copy Markdown
Member

Good catch, thanks @pablodorrio! 🚀

@tiangolo tiangolo merged commit c502197 into fastapi:master Sep 2, 2023
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.

3 participants