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

Add to docs with example of validation errors in templates #321

Merged
merged 1 commit into from
Jul 28, 2020
Merged

Add to docs with example of validation errors in templates #321

merged 1 commit into from
Jul 28, 2020

Conversation

sampart
Copy link

@sampart sampart commented Jan 9, 2018

I had to look at http://flask.pocoo.org/docs/0.12/patterns/wtforms/#forms-in-templates to see how to do this, and thought it would make a good addition to the Flask-WTF docs themselves.

.. sourcecode:: html+jinja

{% if form.name.errors %}
<ul class=errors>
Copy link
Contributor

Choose a reason for hiding this comment

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

Use proper HTML instead.

<ul class="errors">

Copy link
Member

Choose a reason for hiding this comment

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

I'm fine with either. Armin is adamant that we don't use quotes or closing tags if we don't have to in the Flask docs.

Copy link
Author

Choose a reason for hiding this comment

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

Whoops, sorry for the typo. I've amended the commit and force-pushed, so it should be sorted now. Thanks

@codecov-io
Copy link

codecov-io commented Jan 9, 2018

Codecov Report

Merging #321 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #321   +/-   ##
=======================================
  Coverage   99.67%   99.67%           
=======================================
  Files          18       18           
  Lines         911      911           
  Branches       74       74           
=======================================
  Hits          908      908           
  Misses          3        3

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9cb0ac6...cae7fbb. Read the comment docs.

@azmeuk azmeuk added the docs label Jul 28, 2020
@azmeuk azmeuk merged commit 76413ae into pallets-eco:master Jul 28, 2020
@sampart
Copy link
Author

sampart commented Jul 30, 2020

Thank you!

@sampart sampart deleted the docs/displaying-form-errors branch July 30, 2020 10:52
@davidism davidism added this to the v0.15 milestone May 24, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

5 participants