Skip to content

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
gusevyaroslove pushed a commit to gusevyaroslove/fastapi-template that referenced this pull request Aug 4, 2024
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