public void Validate(IObjectValidator validator) { validator.Verify(ValueThree > 500, "ValueThreeValidationMessage"); EntityValidateInvoked = true; if (Child != null) { validator.AddChild(Child); } Children?.ForEach(c => validator.AddChild(c)); validator.Verify(ValueInfoOne == 1000, "ValueWarningOne", ValidationTypes.Info); }
public void Validate(IObjectValidator validator) { WasValidationMethodInvoked = true; if (AddPredicateValidation) { validator.Verify(PropWithAttribValidation != 13, "Value can't be 13."); } if (validator.IsValid && EnlistChildObjectOne != null) { validator.AddChild(EnlistChildObjectOne); } if (validator.IsValid && EnlistChildObjectTwo != null) { validator.AddChild(EnlistChildObjectTwo); } }
public void Validate(IObjectValidator validator) { validator.AddChild(Hosts); validator.AddChildren(ExchangeSettings); validator.AddChildren(QueueSettings); }
public void Validate(IObjectValidator validator) { validator.AddChild(Contact); validator.Verify(!string.IsNullOrWhiteSpace(Vin) && Vin.Length == 17, "VIN required and must be 17 characters."); }