Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
using FluentValidation;
using Grand.Infrastructure.Validators;
using Grand.Module.Installer.Models;
namespace Grand.Module.Installer.Validators;
public class InstallValidator : BaseGrandValidator<InstallModel>
{
public InstallValidator(
IEnumerable<IValidatorConsumer<InstallModel>> validators)
: base(validators)
{
RuleFor(x => x.AdminEmail).NotEmpty();
RuleFor(x => x.AdminEmail).EmailAddress();
RuleFor(x => x.AdminPassword).NotEmpty();
RuleFor(x => x.ConfirmPassword).NotEmpty();
RuleFor(x => x.AdminPassword).Equal(x => x.ConfirmPassword)
.WithMessage("Passwords must be equals");
}
}