feat(creator): allow text for description

This commit is contained in:
2025-04-25 01:22:11 -04:00
parent dcd4ec3b75
commit 57fbbf17a5
5 changed files with 47 additions and 26 deletions

View File

@@ -42,7 +42,7 @@ public class Socials
public class Presentation
{
[MaxLength(2000)] public string Description { get; set; } = null!;
public string Description { get; set; } = null!;
[MaxLength(2048)] public string? VideoUrl { get; set; }
[MaxLength(255)] public string? PhoneNumber { get; set; }
[MaxLength(255)] public string? Email { get; set; }

View File

@@ -311,8 +311,7 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations
b1.Property<string>("Description")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
.HasColumnType("text");
b1.Property<string>("Email")
.HasMaxLength(255)

View File

@@ -20,7 +20,9 @@ public sealed class ChangePresentationInfosRequestValidator : Validator<ChangePr
RuleFor(x => x.Description)
.NotEmpty()
.WithMessage("Description is required");
.WithMessage("Description is required")
.MaximumLength(2000)
.WithMessage("Description cannot exceed 2000 characters");
RuleFor(x => x.VideoUrl)
.Must(url => url == null || YouTubeUrlHelper.IsValidYouTubeUrlOrId(url))