Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
19 lines (15 sloc) 710 Bytes
using FluentValidation;
namespace DotNetGigs.ViewModels.Validations
{
public class RegistrationViewModelValidator : AbstractValidator<RegistrationViewModel>
{
public RegistrationViewModelValidator()
{
RuleFor(vm => vm.Email).NotEmpty().WithMessage("Email cannot be empty");
RuleFor(vm => vm.Password).NotEmpty().WithMessage("Password cannot be empty");
RuleFor(vm => vm.FirstName).NotEmpty().WithMessage("FirstName cannot be empty");
RuleFor(vm => vm.LastName).NotEmpty().WithMessage("LastName cannot be empty");
RuleFor(vm => vm.Location).NotEmpty().WithMessage("Location cannot be empty");
}
}
}
You can’t perform that action at this time.