Files
slp-modular-cms/src/SlpModularCms.Modules.Offerings/Models/UpdateOfferingRequest.cs
T
SluijsensandClaude Sonnet 5.5 d12e44350e Vertaalbestanden 4/6: Offerings-validatiemeldingen naar Texts/nl.json en en.json (offerings.validation.*)
GEDRAGSWIJZIGING (goedgekeurd): de validatiemeldingen waren Engels en zijn nu Nederlands bij Texts:DefaultLanguage=nl (alleen zichtbaar voor beheerders). De Engelse teksten zijn de oude meldingen, letterlijk. TextCatalog.Default omvat nu alle geladen SlpModularCms.*-assemblies (fallback buiten DI).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 20:44:38 +01:00

24 lines
931 B
C#

using System.ComponentModel.DataAnnotations;
namespace SlpModularCms.Modules.Offerings.Models;
public record UpdateOfferingRequest(
[Required, MaxLength(100)] string Title,
// Optional: missing, null and "" are all stored as "" (the websites that do not use them leave them out).
[MaxLength(500)] string? Description,
[Required, MaxLength(50)] string Price,
[MaxLength(100)] string? PriceNote,
[Required, FeaturesValidation] List<string> Features,
[Required(AllowEmptyStrings = true), MaxLength(50)] string CtaLabel,
bool Featured = false,
[MaxLength(130)] string? Slug = null,
Guid? CategoryId = null,
bool IsActive = true,
DateTimeOffset? StartsAt = null,
DateTimeOffset? EndsAt = null
) : IValidatableObject
{
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
=> OfferingSchedule.Validate(StartsAt, EndsAt, validationContext);
}