changes in model, actor roles adding in person edit page finished
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using FluentValidation;
|
||||
using WatchIt.Common.Model.Roles;
|
||||
using WatchIt.Database;
|
||||
|
||||
namespace WatchIt.WebAPI.Validators.Roles;
|
||||
|
||||
public class ActorRoleMediaRequestValidator : AbstractValidator<ActorRoleMediaRequest>
|
||||
{
|
||||
public ActorRoleMediaRequestValidator(DatabaseContext database)
|
||||
{
|
||||
Include(new BaseActorRoleRequestValidator(database));
|
||||
RuleFor(x => x.PersonId).NotEmpty()
|
||||
.NotNull()
|
||||
.MustBeIn(database.Persons.Select(x => x.Id).ToList());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user