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 input validation (shiny_validate) to docs #238

Open
thohan88 opened this issue Jan 7, 2025 · 2 comments
Open

Add input validation (shiny_validate) to docs #238

thohan88 opened this issue Jan 7, 2025 · 2 comments

Comments

@thohan88
Copy link

thohan88 commented Jan 7, 2025

I recently had a need for input validation. I tried searching through these docs for validate and validation but found nothing. This Posit Community post and this stackoverflow post suggests that you need to do it yourself.

After implementing my own solution I came across shiny_validate which solves everything. I think it would be useful if the documentation could include a mention of it, maybe even as an entry in the "User interface"-sidebar?
Image

@gadenbuie
Copy link
Contributor

gadenbuie commented Jan 7, 2025

Thanks for the comment! Gordon is the one who implemented shiny_validate, likely just after that community post.

It's hard to envision creating a new section in the sidebar for input validation, but maybe we can find a place in those sections to add a callout.

I tried searching the docs and the word "validate" has a lot of hits. We actually do mention shiny_validate but you'd have to use "validate the form inputs" to get a direct hit. I think we could easily reword the sentences to include "input validation" – are there any other terms you looked for?

@thohan88
Copy link
Author

thohan88 commented Jan 7, 2025

Yeah, I suggested the sidebar because I was not really sure which sections it would fit in. Right now it's a bit buried in the survey-template you reference. I think maybe the reason I did not discover it is that it drowns in search results for invalidating reactives:

Image

My search process was something like this:

  1. Google Search: shiny python input validation (links above)
  2. Web Search in py-shiny-site: Validate or Validation (drowns in validation)
  3. Github search in py-shiny: Validate or Validation (no hits)
  4. Github search in py-shiny-site: Validate or Validation (discover survey template)

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

No branches or pull requests

2 participants