public void SetupValidationRules(ModelValidator <ShipmentHistoryModel> v)
 {
     v.RuleFor(x => x.ShipmentStatus).NotEmpty().When(x => x.Id < 1);
     v.RuleFor(x => x.CreatedOn).NotEmpty().When(x => x.Id > 0);
     v.RuleFor(x => x.ShipmentId).GreaterThan(0);
 }
        public void SetupValidationRules(ModelValidator <UploadFileModel> v)
        {
            v.RuleFor(x => x.MediaFile).NotNull().Must(x => x.Length != 0);

            v.RuleFor(x => x.ProductId).GreaterThan(0);
        }
 public void SetupValidationRules(ModelValidator <ProductRelationsModel> v)
 {
     v.RuleFor(x => x.ProductId).GreaterThan(0);
     v.RuleFor(x => x.DestinationProductIds).Must(x => x.Any());
 }
Exemple #4
0
 public void SetupValidationRules(ModelValidator <CreateCatalogModel> v)
 {
     v.RuleFor(x => x.Name).NotEmpty();
     v.RuleFor(x => x.SourceStoreId).GreaterThan(0);
 }
Exemple #5
0
 public void SetupValidationRules(ModelValidator <CategoryModel> v)
 {
     v.RuleFor(x => x.Name).NotEmpty();
 }
 public void SetupValidationRules(ModelValidator <ReviewSearchModel> v)
 {
     v.RuleFor(x => x.Page).GreaterThan(0);
     v.RuleFor(x => x.Count).GreaterThan(0);
 }
Exemple #7
0
 public void SetupValidationRules(ModelValidator <OrderDownloadModel> v)
 {
     v.RuleFor(x => x.DownloadId).GreaterThan(0);
 }
 public void SetupValidationRules(ModelValidator <ShipmentModel> v)
 {
     v.RuleFor(x => x.OrderId).GreaterThan(0);
     v.RuleFor(x => x.WarehouseId).GreaterThan(0);
 }
 public void SetupValidationRules(ModelValidator <EmailVerificationModel> v)
 {
     v.RuleFor(x => x.Code).NotEmpty();
     v.RuleFor(x => x.Email).EmailAddress().NotEmpty();
 }
Exemple #10
0
 public void SetupValidationRules(ModelValidator <ManufacturerModel> v)
 {
     v.RuleFor(x => x.Name).NotEmpty();
 }
Exemple #11
0
 public void SetupValidationRules(ModelValidator <ScheduledTaskModel> v)
 {
     v.RuleFor(x => x.Id).NotEmpty().GreaterThan(0);
     v.RuleFor(x => x.Seconds).NotEmpty().GreaterThanOrEqualTo(10);
 }
Exemple #12
0
 public void SetupValidationRules(ModelValidator <MenuItemModel> v)
 {
     v.RuleFor(x => x.MenuId).GreaterThan(0);
     v.RuleFor(x => x.Name).NotEmpty();
     v.RuleFor(x => x.SeoMetaId).GreaterThan(0);
 }
Exemple #13
0
 public void SetupValidationRules(ModelValidator <CurrencyModel> v)
 {
     v.RuleFor(x => x.Name).NotEmpty();
     v.RuleFor(x => x.IsoCode).NotEmpty();
 }
Exemple #14
0
 public void SetupValidationRules(ModelValidator <DownloadModel> v)
 {
     v.RuleFor(x => x.ProductId).GreaterThan(0);
 }
Exemple #15
0
 public void SetupValidationRules(ModelValidator <UploadPackageModel> v)
 {
     v.RuleFor(x => x.MediaFile).NotNull();
 }
 public void SetupValidationRules(ModelValidator <UserSearchModel> v)
 {
     v.RuleFor(x => x.RowCount).GreaterThanOrEqualTo(1).LessThanOrEqualTo(100);
     v.RuleFor(x => x.Current).GreaterThanOrEqualTo(1);
 }
 public void SetupValidationRules(ModelValidator <PluginsSearchModel> v)
 {
     v.RuleFor(x => x.Current).GreaterThan(0);
     v.RuleFor(x => x.RowCount).LessThanOrEqualTo(30).GreaterThanOrEqualTo(0);
 }
Exemple #18
0
 public void SetupValidationRules(ModelValidator <WidgetModel> v)
 {
     v.RuleFor(x => x.ZoneName).NotEmpty();
     v.RuleFor(x => x.WidgetSystemName).NotEmpty();
     v.RuleFor(x => x.PluginSystemName).NotEmpty();
 }
Exemple #19
0
 public void SetupValidationRules(ModelValidator <VendorModel> v)
 {
     v.RuleFor(x => x.Name).NotEmpty();
     v.RuleFor(x => x.Address).NotEmpty();
 }
Exemple #20
0
 public void SetupValidationRules(ModelValidator <DiscountModel> v)
 {
     v.RuleFor(x => x.Name).NotEmpty();
 }
Exemple #21
0
 public void SetupValidationRules(ModelValidator <SubscriptionModel> v)
 {
     v.RuleFor(x => x.SubscriptionGuid).NotEmpty();
     v.RuleFor(x => x.Email).NotEmpty().EmailAddress().When(x => ApplicationEngine.CurrentUser.IsVisitor());
 }
 public void SetupValidationRules(ModelValidator <AffiliateSettingsModel> v)
 {
     v.RuleFor(x => x.AffiliateCookieName).NotEmpty().When(x => x.EnableAffiliates);
 }
Exemple #23
0
 public void SetupValidationRules(ModelValidator <PaymentMethodModel> v)
 {
     v.RuleFor(x => x.SystemName).NotEmpty().When(x => !x.UseStoreCredits);
 }
 public void SetupValidationRules(ModelValidator <GenerateInvitationLinkModel> v)
 {
     v.RuleFor(x => x.Email).EmailAddress();
 }
Exemple #25
0
 public void SetupValidationRules(ModelValidator <SettingsModel> v)
 {
     v.RuleFor(x => x.ClientSecret).NotEmpty();
     v.RuleFor(x => x.ClientId).NotEmpty();
 }
 public void SetupValidationRules(ModelValidator <MediaUploadModel> v)
 {
     v.RuleFor(x => x.MediaFile).NotNull().Must(x => x.Length != 0);
 }
Exemple #27
0
 public void SetupValidationRules(ModelValidator <ReviewModel> v)
 {
     v.RuleFor(x => x.Rating).GreaterThan(0).LessThan(6);
 }
Exemple #28
0
 public void SetupValidationRules(ModelValidator <UserModel> v)
 {
     v.RuleFor(x => x.Email).NotEmpty().EmailAddress();
     v.RuleFor(x => x.FirstName).NotEmpty();
     v.RuleFor(x => x.LastName).NotEmpty();
 }
 public void SetupValidationRules(ModelValidator <StateOrProvinceModel> v)
 {
     v.RuleFor(x => x.CountryId).GreaterThan(0);
     v.RuleFor(x => x.Name).NotEmpty();
 }
Exemple #30
0
 public void SetupValidationRules(ModelValidator <ProductAttributeValueModel> v)
 {
     v.RuleFor(x => x.AttributeValue).NotEmpty().When(x => x.Id == 0);
 }