Exemplo n.º 1
0
        public PatchActivityStatusDtoValidor()
        {
            List <string> conditions = ValidatorHelper.GetPossibleAccountStatus();

            RuleFor(x => x.Status)
            .Must(x => conditions.Contains(x))
            .WithMessage("Accepted Values: " + String.Join(",", conditions));
        }
Exemplo n.º 2
0
        public ActivityDtoValidator()
        {
            RuleFor(m => m.Description).NotEmpty();
            RuleFor(m => m.Amount).NotEmpty();

            List <string> conditions = ValidatorHelper.GetPossibleAccountStatus();

            RuleFor(x => x.Status)
            .Must(x => conditions.Contains(x))
            .WithMessage("Accepted Values: " + String.Join(",", conditions));
        }