Squash and merge of version-0.1 Co-authored-by: James Wampler <james@wamp.dev> Co-committed-by: James Wampler <james@wamp.dev>
15 lines
398 B
C#
Executable File
15 lines
398 B
C#
Executable File
using FluentValidation;
|
|
|
|
namespace MicCheck.Api.Environments;
|
|
|
|
public record CreateEnvironmentRequest(string Name, int ProjectId);
|
|
|
|
public class CreateEnvironmentRequestValidator : AbstractValidator<CreateEnvironmentRequest>
|
|
{
|
|
public CreateEnvironmentRequestValidator()
|
|
{
|
|
RuleFor(x => x.Name).NotEmpty().MaximumLength(200);
|
|
RuleFor(x => x.ProjectId).GreaterThan(0);
|
|
}
|
|
}
|