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 real-time validation at JsonInput edit #40

Merged
merged 3 commits into from
Jan 19, 2022

Conversation

JulioBorges
Copy link
Contributor

@JulioBorges JulioBorges commented Jan 6, 2022

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

  • Create Parse and TryParse methods at EnvelopeViewMode.cs to enrich domain rule;
  • Create JsonEnvelopeValidationRule.cs to encapsulate ValidationRule from JsonInput
  • Include JsonEnvelopeValidation at SessionView.xaml
  • Rename DarkModeDictionary.xaml to ApplicationResourcesDictionary.xaml, because the purpose of file has changed.

Screens

With Dark mode
image

Without Dark mode
image

@andreminelli
Copy link
Contributor

Hi @JulioBorges.
Thanks for this. We just merged another - old - PR, and some files are now conflicting.
Can you please merge and solve this?

@JulioBorges
Copy link
Contributor Author

Hi @JulioBorges. Thanks for this. We just merged another - old - PR, and some files are now conflicting. Can you please merge and solve this?

the merge has already been completed

@andreminelli andreminelli merged commit 64b36c9 into takenet:master Jan 19, 2022
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.

2 participants