-
Notifications
You must be signed in to change notification settings - Fork 0
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
Validation_For_Create_DTOs #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are the validations for the properties defined in ReviewBaseDto?
@@ -8,6 +8,7 @@ | |||
|
|||
<ItemGroup> | |||
<PackageReference Include="Bogus" Version="35.6.1" /> | |||
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be in application layer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validators should be configured in Application Layer
@@ -1,4 +1,5 @@ | |||
using CheckDrive.Api.Extensions; | |||
using FluentValidation.AspNetCore; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is this used?
@@ -12,7 +13,7 @@ | |||
|
|||
var builder = WebApplication.CreateBuilder(args); | |||
|
|||
builder.Host.UseSerilog(); | |||
builder.Host.UseSerilog(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant space
@@ -4,6 +4,7 @@ namespace CheckDrive.Application.DTOs.DispatcherReview; | |||
|
|||
public sealed record CreateDispatcherReviewDto( | |||
int CheckPointId, | |||
int DriverId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CheckPointid should be enough, because CheckPoint.DoctorReview already contains DriverId we can take from there.
RuleFor(x => x.DriverId) | ||
.GreaterThan(0).WithMessage("Haydovchini tanlashingiz shart."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to check for DoctorId?
@@ -24,6 +24,7 @@ | |||
<PackageReference Include="FluentEmail.Core" Version="3.0.2" /> | |||
<PackageReference Include="FluentEmail.MailKit" Version="3.0.2" /> | |||
<PackageReference Include="FluentEmail.Razor" Version="3.0.2" /> | |||
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does his layer need this package?
@@ -8,6 +8,7 @@ | |||
|
|||
<ItemGroup> | |||
<PackageReference Include="Bogus" Version="35.6.1" /> | |||
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does his layer need this package?
@@ -17,6 +17,7 @@ | |||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | |||
</PackageReference> | |||
<PackageReference Include="FluentAssertions" Version="6.12.1" /> | |||
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does his layer need this package?
@@ -15,6 +15,7 @@ | |||
<PackageReference Include="AutoFixture.Idioms" Version="4.18.1" /> | |||
<PackageReference Include="coverlet.collector" Version="6.0.0" /> | |||
<PackageReference Include="FluentAssertions" Version="6.12.1" /> | |||
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does his layer need this package?
namespace CheckDrive.Application.Validators; | ||
public class CreateDispatcherReviewDtoValidator : AbstractValidator<CreateDispatcherReviewDto> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there must be a space.
namespace CheckDrive.Application.Validators; | ||
public class CreateDoctorReviewDtoValidator : AbstractValidator<CreateDoctorReviewDto> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there must be a space here as well
namespace CheckDrive.Application.Validators; | ||
public class CreateMechanicAcceptanceReviewDtoValidator : AbstractValidator<CreateMechanicAcceptanceReviewDto> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!
change target branch from master to integration |
No description provided.