AspNetCoreHero-Boilerplate icon indicating copy to clipboard operation
AspNetCoreHero-Boilerplate copied to clipboard

Validation

Open krasni opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Hello, Currently project is not implementing validation. After adding this line to AddApplicationLayer:

services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationBehaviour<,>));

project is raising error if new product specification is not satisfied:

if (failures.Count != 0) throw new Exceptions.ValidationException(failures);

How can I send these errors to user to be shown in new product form?

Thank you very much.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

krasni avatar Nov 02 '20 07:11 krasni