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

Added ValidationService and sample use case #541

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

MatteoZampariniDev
Copy link
Collaborator

@MatteoZampariniDev MatteoZampariniDev commented Oct 16, 2023

Instead of writing the ValidateValue method in every Validator model and instantiating a validator class in blazor components I created a ValidationService that takes care of it.

I implemented it only for AddEditProductCommand and RegisterFormModel for demonstration purposes, if this is accepted all the validators could be updated.

In the case of RegisterFormModelFluentValidator injecting it as a services is no longer required since the ValidationService handles the service injection too.

Copy link
Owner

@neozhu neozhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciation for Your Contribution

I really like this approach you've taken. Thank you so much! I hope you'll continue to provide your valuable insights for this project in the future.

@neozhu neozhu merged commit 62486af into neozhu:main Oct 16, 2023
2 checks passed
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.

None yet

2 participants