Files
imprink/src/Imprink.Application/Users/Validation/SetUserFullNameCommandValidator.cs
2025-06-20 14:56:29 +03:00

18 lines
635 B
C#

using FluentValidation;
using Imprink.Application.Users.Commands;
namespace Imprink.Application.Users.Validation;
public class SetUserFullNameCommandValidator : AbstractValidator<SetUserFullNameCommand>
{
public SetUserFullNameCommandValidator()
{
RuleFor(x => x.FirstName)
.NotEmpty().WithMessage("FirstName is required.")
.Length(1, 50).WithMessage("FirstName must be between 1 and 50 characters.");
RuleFor(x => x.LastName)
.NotEmpty().WithMessage("LastName is required.")
.Length(1, 50).WithMessage("LastName must be between 1 and 50 characters.");
}
}