Add screen validation for non-array screens#206
Merged
sverhoeven merged 8 commits intomainfrom Oct 11, 2021
Merged
Conversation
Closed
fdiblen
reviewed
Oct 7, 2021
| validator = makeOptionalFieldValidator(subschema) | ||
| } | ||
| const vr = validator(value.value) | ||
| console.log({ subschema, v: value.value, vr }) |
Member
There was a problem hiding this comment.
Suggested change
| console.log({ subschema, v: value.value, vr }) |
fdiblen
reviewed
Oct 7, 2021
| ).every( | ||
| (v) => v === true | ||
| ) | ||
| console.log(r) |
jspaaks
reviewed
Oct 7, 2021
jspaaks
reviewed
Oct 7, 2021
| title="Related resources" | ||
| v-bind:order="4" | ||
| v-if="showAdvanced" | ||
| v-bind:error="!validScreens['related-resources'].value" |
Collaborator
Author
There was a problem hiding this comment.
What do you mean?
Member
There was a problem hiding this comment.
validScreen.relatedResources.value
also in src/store/screens.ts versionSpecific and relatedResources
Member
There was a problem hiding this comment.
And version-specific screen in src/components/Stepper.vue may be missing v-bind:error="!validScreens.versionSpecific.value"
Collaborator
Author
There was a problem hiding this comment.
Added it in citation-file-format/cffinit@5a2a911 this morning
Collaborator
Author
|
Thanks for reviewing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request details
List of related issues or pull requests
Refs: #165 and #229
Describe the changes made in this pull request
This PR adds validation for each non-array screen aka screens which are not for authors, identifiers or keywords.
If any field on a screen is invalid then the step in the left side stepper that belongs to that screen will get an exclamation triangle.
Instructions to review the pull request