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 form validation docs #178

Merged
merged 4 commits into from
Oct 31, 2023
Merged

add form validation docs #178

merged 4 commits into from
Oct 31, 2023

Conversation

ryanbethel
Copy link
Contributor

Document form validation patterns and the problems loop

@ryanbethel ryanbethel requested a review from colepeters October 25, 2023 21:23
Copy link
Member

@colepeters colepeters left a comment

Choose a reason for hiding this comment

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

Just a few tiny suggestions, otherwise this is great! 🤩

app/docs/md/patterns/form-validation.md Outdated Show resolved Hide resolved
app/docs/md/patterns/form-validation.md Outdated Show resolved Hide resolved
app/docs/md/patterns/form-validation.md Outdated Show resolved Hide resolved
app/docs/md/patterns/form-validation.md Outdated Show resolved Hide resolved
<enhance-form
action="/books/${book.key}"
method="POST">
${'' /* 3. Overall form error messages */}
Copy link
Member

Choose a reason for hiding this comment

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

Wondering about the ${ '' … } comments here — were // comments not working?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this is inside a block of HTML I did not want the comment to be rendered as an HTML comment. So I opted for the JS comment inside the literal so it doesn't render to the markup. But I agree it looks weird. If you think I should go with HTML comments here that would be fine.

Copy link
Member

Choose a reason for hiding this comment

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

Ohhh, clever! I hadn't thought of that. Nice!

@colepeters colepeters linked an issue Oct 26, 2023 that may be closed by this pull request
@colepeters
Copy link
Member

@ryanbethel Just a li'l typo then good to go! :D

Copy link
Member

@colepeters colepeters left a comment

Choose a reason for hiding this comment

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

Great work!

@colepeters colepeters merged commit 7160597 into main Oct 31, 2023
4 checks passed
@colepeters colepeters deleted the form-validation branch October 31, 2023 15:27
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.

Form validation (problems loop)
2 participants