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);
 }
Esempio n. 2
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());
 }
Esempio n. 4
0
 public void SetupValidationRules(ModelValidator <CreateCatalogModel> v)
 {
     v.RuleFor(x => x.Name).NotEmpty();
     v.RuleFor(x => x.SourceStoreId).GreaterThan(0);
 }
Esempio n. 5
0
 public void SetupValidationRules(ModelValidator <CategoryModel> v)
 {
     v.RuleFor(x => x.Name).NotEmpty();
 }
Esempio n. 6
0
 public void SetupValidationRules(ModelValidator <ReviewSearchModel> v)
 {
     v.RuleFor(x => x.Page).GreaterThan(0);
     v.RuleFor(x => x.Count).GreaterThan(0);
 }
Esempio n. 7
0
 public void SetupValidationRules(ModelValidator <OrderDownloadModel> v)
 {
     v.RuleFor(x => x.DownloadId).GreaterThan(0);
 }
Esempio n. 8
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();
 }
Esempio n. 10
0
 public void SetupValidationRules(ModelValidator <ManufacturerModel> v)
 {
     v.RuleFor(x => x.Name).NotEmpty();
 }
Esempio n. 11
0
 public void SetupValidationRules(ModelValidator <ScheduledTaskModel> v)
 {
     v.RuleFor(x => x.Id).NotEmpty().GreaterThan(0);
     v.RuleFor(x => x.Seconds).NotEmpty().GreaterThanOrEqualTo(10);
 }
Esempio n. 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);
 }
Esempio n. 13
0
 public void SetupValidationRules(ModelValidator <CurrencyModel> v)
 {
     v.RuleFor(x => x.Name).NotEmpty();
     v.RuleFor(x => x.IsoCode).NotEmpty();
 }
Esempio n. 14
0
 public void SetupValidationRules(ModelValidator <DownloadModel> v)
 {
     v.RuleFor(x => x.ProductId).GreaterThan(0);
 }
Esempio n. 15
0
 public void SetupValidationRules(ModelValidator <UploadPackageModel> v)
 {
     v.RuleFor(x => x.MediaFile).NotNull();
 }
Esempio n. 16
0
 public void SetupValidationRules(ModelValidator <UserSearchModel> v)
 {
     v.RuleFor(x => x.RowCount).GreaterThanOrEqualTo(1).LessThanOrEqualTo(100);
     v.RuleFor(x => x.Current).GreaterThanOrEqualTo(1);
 }
Esempio n. 17
0
 public void SetupValidationRules(ModelValidator <PluginsSearchModel> v)
 {
     v.RuleFor(x => x.Current).GreaterThan(0);
     v.RuleFor(x => x.RowCount).LessThanOrEqualTo(30).GreaterThanOrEqualTo(0);
 }
Esempio n. 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();
 }
Esempio n. 19
0
 public void SetupValidationRules(ModelValidator <VendorModel> v)
 {
     v.RuleFor(x => x.Name).NotEmpty();
     v.RuleFor(x => x.Address).NotEmpty();
 }
Esempio n. 20
0
 public void SetupValidationRules(ModelValidator <DiscountModel> v)
 {
     v.RuleFor(x => x.Name).NotEmpty();
 }
Esempio n. 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);
 }
Esempio n. 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();
 }
Esempio n. 25
0
 public void SetupValidationRules(ModelValidator <SettingsModel> v)
 {
     v.RuleFor(x => x.ClientSecret).NotEmpty();
     v.RuleFor(x => x.ClientId).NotEmpty();
 }
Esempio n. 26
0
 public void SetupValidationRules(ModelValidator <MediaUploadModel> v)
 {
     v.RuleFor(x => x.MediaFile).NotNull().Must(x => x.Length != 0);
 }
Esempio n. 27
0
 public void SetupValidationRules(ModelValidator <ReviewModel> v)
 {
     v.RuleFor(x => x.Rating).GreaterThan(0).LessThan(6);
 }
Esempio n. 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();
 }
Esempio n. 29
0
 public void SetupValidationRules(ModelValidator <StateOrProvinceModel> v)
 {
     v.RuleFor(x => x.CountryId).GreaterThan(0);
     v.RuleFor(x => x.Name).NotEmpty();
 }
Esempio n. 30
0
 public void SetupValidationRules(ModelValidator <ProductAttributeValueModel> v)
 {
     v.RuleFor(x => x.AttributeValue).NotEmpty().When(x => x.Id == 0);
 }