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

frontend-forms: Make the validation function Behavior -> BehaviorValidation --- blocked on #49 #50

Merged
merged 11 commits into from
Mar 1, 2019

Conversation

Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Feb 28, 2019

This allows validation to take external state into account. Validation can pull external state, but never be pushed by it, as the validations make clear.

@Ericson2314 Ericson2314 changed the base branch from je-validation-error-param to develop February 28, 2019 00:32
@Ericson2314 Ericson2314 changed the title frontend-forms: Make the validation function Dynamic -> Dynamic frontend-forms: Make the validation function Dynamic -> Dynamic --- blocked on #49 Feb 28, 2019
This is a hack to allow validation to take external state into account.
We want that external state to only be something that can be pulled,
never something that pushes validation.

At least the DynValidation return type promotes merging with other
`DynValidation`s.
@Ericson2314 Ericson2314 force-pushed the je-hack-in-external-validation branch from e89876d to 2c123c9 Compare February 28, 2019 00:56
@Ericson2314 Ericson2314 changed the title frontend-forms: Make the validation function Dynamic -> Dynamic --- blocked on #49 frontend-forms: Make the validation function Dynamic -> DynValidation --- blocked on #49 Feb 28, 2019
This fixes an error where the user can cause validation errors to be
displayed more often than they should. It also makes clear to the user
though the type that they don't have that power (behaviors cannot push).
@Ericson2314 Ericson2314 changed the title frontend-forms: Make the validation function Dynamic -> DynValidation --- blocked on #49 frontend-forms: Make the validation function Behavior -> BehaviorValidation --- blocked on #49 Feb 28, 2019
Useful for adding extra checks
User facing text should be provided by the caller
We need this to leak the original buttom click, so we can gate a new
round of validation with it regardless of whether that will end up valid
and trigger a response.
 A. One looses promptness on external changes, which is also valid, when
    the whole point was promptness.

 B. If one fires "revaluate" more often than the input changes, we do
    want to resample the outside world. E.g. maybe an input becamse *more*
    valid.

Plain behavior did B, What we have now does niether. But "full dynamic"
which is then gated does both.
@luigy luigy merged commit 0ec1c5e into develop Mar 1, 2019
@luigy luigy deleted the je-hack-in-external-validation branch March 1, 2019 13:36
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.

3 participants