Skip to content

🚸 Mark login field as required #1166

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

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

patrick91
Copy link
Contributor

This PR marks email and password as required, so we don't send
the form if they are empty.

It also checks if errors returned by the server are a list, and, if so,
we show a generic error message.

Comment on lines +46 to +47
if (Array.isArray(errDetail)) {
errDetail = "Something went wrong"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is usually when getting a pydantic validation error.

It would be nice to make the error to each field, but it's not straightforward 😊

@tiangolo tiangolo requested a review from alejsdev April 10, 2024 10:09
@alejsdev alejsdev changed the title Mark login field as required 🚸 Mark login field as required Apr 12, 2024
@alejsdev alejsdev merged commit 615170d into fastapi:master Apr 12, 2024
3 checks passed
gusevyaroslove pushed a commit to gusevyaroslove/fastapi-template that referenced this pull request Aug 4, 2024
JBLangton pushed a commit to JBLangton/full-stack-fastapi-template that referenced this pull request Mar 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants