mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
19 lines
802 B
C#
19 lines
802 B
C#
using FluentValidation;
|
|
|
|
namespace Artemis.UI.Screens.SurfaceEditor.Dialogs
|
|
{
|
|
public class SurfaceDeviceConfigViewModelValidator : AbstractValidator<SurfaceDeviceConfigViewModel>
|
|
{
|
|
public SurfaceDeviceConfigViewModelValidator()
|
|
{
|
|
RuleFor(m => m.X).GreaterThanOrEqualTo(0).WithMessage("X-coordinate must be 0 or greater");
|
|
|
|
RuleFor(m => m.Y).GreaterThanOrEqualTo(0).WithMessage("Y-coordinate must be 0 or greater");
|
|
|
|
RuleFor(m => m.Scale).GreaterThanOrEqualTo(0.2).WithMessage("Scale must be 0.2 or greater");
|
|
|
|
RuleFor(m => m.Rotation).GreaterThanOrEqualTo(0).WithMessage("Rotation must be 0 or greater");
|
|
RuleFor(m => m.Rotation).LessThanOrEqualTo(359).WithMessage("Rotation must be 359 or less");
|
|
}
|
|
}
|
|
} |