Skip to content

Commit

Permalink
#6631 Added address validator for the CustomerAddressModel model
Browse files Browse the repository at this point in the history
  • Loading branch information
skoshelev committed Mar 7, 2023
1 parent 2aa8f63 commit d0b9017
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using FluentValidation;
using Nop.Core.Domain.Common;
using Nop.Data.Mapping;
using Nop.Services.Localization;
using Nop.Web.Areas.Admin.Models.Customers;
using Nop.Web.Areas.Admin.Validators.Common;

namespace Nop.Web.Areas.Admin.Validators.Customers
{
public partial class CustomerAddressValidator : AbstractValidator<CustomerAddressModel>
{
public CustomerAddressValidator(ILocalizationService localizationService,
IMappingEntityAccessor mappingEntityAccessor,
AddressSettings addressSettings)
{
RuleFor(model => model.Address).SetValidator(new AddressValidator(addressSettings, localizationService, mappingEntityAccessor));
}
}
}

0 comments on commit d0b9017

Please sign in to comment.