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

Validation_For_Create_DTOs #6

Closed
wants to merge 21 commits into from

Conversation

SharifovDeveloper
Copy link
Contributor

No description provided.

@SharifovDeveloper SharifovDeveloper linked an issue Oct 5, 2024 that may be closed by this pull request
Copy link
Contributor

@Mirazyzz Mirazyzz left a 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" />
Copy link
Contributor

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

Copy link
Contributor

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;
Copy link
Contributor

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();
Copy link
Contributor

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,
Copy link
Contributor

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.

Comment on lines +9 to +10
RuleFor(x => x.DriverId)
.GreaterThan(0).WithMessage("Haydovchini tanlashingiz shart.");
Copy link
Contributor

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" />
Copy link
Contributor

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" />
Copy link
Contributor

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" />
Copy link
Contributor

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" />
Copy link
Contributor

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?

Comment on lines +4 to +5
namespace CheckDrive.Application.Validators;
public class CreateDispatcherReviewDtoValidator : AbstractValidator<CreateDispatcherReviewDto>
Copy link
Contributor

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.

Comment on lines +4 to +5
namespace CheckDrive.Application.Validators;
public class CreateDoctorReviewDtoValidator : AbstractValidator<CreateDoctorReviewDto>
Copy link
Contributor

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

Comment on lines +4 to +5
namespace CheckDrive.Application.Validators;
public class CreateMechanicAcceptanceReviewDtoValidator : AbstractValidator<CreateMechanicAcceptanceReviewDto>
Copy link
Contributor

Choose a reason for hiding this comment

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

!

@Mirazyzz
Copy link
Contributor

change target branch from master to integration

@Mirazyzz Mirazyzz deleted the ValidationForCreateDTOs branch January 12, 2025 13:47
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.

Validation For Create Dto`s
3 participants