public ValidateResult ValidateGroup(ValidatorGroup group) { ValidateResult result = new ValidateResult(); result.IsValid = true; group.SortValidators(); List <IValidatorBase> listValidators = group.GetValidators(); foreach (var validator in listValidators) { if (!validator.Validate()) { result.ControlID = group.Name; result.ErrorMessage = validator.ErrorMessage; result.IsValid = false; return(result); } } return(result); }
public void RemoveValidatorGroup(ValidatorGroup group) { listValidatorGroup.Remove(group); }
public void AddValidatorGroup(ValidatorGroup group) { listValidatorGroup.Add(group); }