using FluentValidation; namespace InternshipSystem.Core { public class Mentor { public string FirstName { get; set; } public string LastName { get; set; } public string Email { get; set; } public string PhoneNumber { get; set; } public void UpdateInformation(string firstName, string lastName, string email, string phoneNumber) { FirstName = firstName ?? FirstName; LastName = lastName ?? LastName; Email = email ?? Email; PhoneNumber = phoneNumber ?? PhoneNumber; } public class Validate : AbstractValidator { public Validate() { RuleFor(x => x.FirstName) .NotEmpty(); RuleFor(x => x.LastName) .NotEmpty(); RuleFor(x => x.Email) .NotEmpty(); RuleFor(x => x.PhoneNumber) .NotEmpty(); } } } }