import { Result } from "@repo/rdx-utils"; import { ValueObject } from "./value-object.vo"; export class Name extends ValueObject { static create(value: string, maxLength = 255): Result { const normalized = value.trim(); if (!normalized || normalized.length > maxLength) { return Result.fail(new Error("Nombre inválido.")); } return Result.ok(new Name(normalized)); } }