-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
shiny validate improvements #185
Comments
Thanks Nik. |
Here's an idea: This is done by a function that returns either NULL or the messages, so one would call
This function would be placed in Now, there are more If nobody objects, I will go on with this design., |
@chlebowa Do you mean by this that you will create a hierarchy of validators using Unrelated side note: |
I guess you could use a |
@gogonzo In the examples all of the messages were captured from one
I thought extending the function to be able to accept multiple validators
This way there would be no hierarchy, only that messages from
To be clear, I don't want to change the way validators work, only to pass their messages to the |
@chlebowa What's the advantage of introducing a new validator over |
Adding validators is not within the scope of this task. However, in some cases multiple validators must be created for whatever reason. An example from |
PS. My understanding is this:
|
Of course only the first validation failure was shown, not all of them |
Right. Now there would be many. Is that what we want? |
Yes please!!!! |
Update re multiple validators: So the first validator is defined here and the second one is there. Rules from there cannot be moved to the validator here BUT if one validator is created there, (in the EDIT: |
Related: #198 |
See this PR for my proposed mechanism. |
I implemented If everyone is ok with this, I will:
|
tmc please :) |
My mistake. |
Related to [this issue](insightsengineering/teal.osprey#185) Adds the `validate_inputs` functions to `teal` so they can be called in modules. Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Nikolas Burkoff <[email protected]>
Closes [this issue](#185) Following the introduction of `validate_inputs` to `teal` by [#199](insightsengineering/teal#786), this PR: + changes all possible input validations from `validate` calls to `shinyvalidate` input validators + passes all validators to `validate_input` funcitons Signed-off-by: Aleksander Chlebowski <[email protected]> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Nikolas Burkoff <[email protected]> Co-authored-by: Dawid Kałędkowski <[email protected]> Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
From #183
We should give better error messages in i.e. shinyvalidate::sv_required() takes a message argument so we can have:
And the advantage of this is that the helpful error message is then available to be displayed in the main output so you can see what's wrong directly rather than only being told "please observe red flags in the encoding"
We won't have capacity to do this before the release @donyunardi but it should be considered before we roll shinyvalidate out to other packages
The text was updated successfully, but these errors were encountered: