Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 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");
}
}
}