/// <summary> /// Validate first name and last name /// </summary> /// <returns></returns> public override bool Validate() { IValidator<Person> val = new Validator<Person>(this); val.Property(p => p.FirstName).NotNullOrEmpty("First name can not be empty") .Property(p => p.LastName).NotNullOrEmpty("Last name can not be empty"); this.Messages = val.Messages; return val.IsValid; }