Add real-time validation at JsonInput edit #40
Merged
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.
Motivation
The idea of this Pull request is to include a real-time JsonEnvelope validation. This way the application will provide a more user-friendly experience, making it easier to use.
Currently, when we fill the JSON input field with an invalid Json (for example missing a comma), when trying to send the envelope, we get the error "Value cannot be null.Parameter name: envelope".
With the proposed implementation, validation takes place when filling in the field, thus preventing the user from trying to solve the error.
Changes
Parse
andTryParse
methods atEnvelopeViewMode.cs
to enrich domain rule;JsonEnvelopeValidationRule.cs
to encapsulate ValidationRule from JsonInputJsonEnvelopeValidation
atSessionView.xaml
DarkModeDictionary.xaml
toApplicationResourcesDictionary.xaml
, because the purpose of file has changed.Screens
With Dark mode
Without Dark mode