Skip to content

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
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