private bool IsCorrectable(IRowStream row, FieldDescription field, string fieldValue, bool isValidated, ValidateStatement vs, IFieldValidator validator) { if (vs.AutoCorrect) { string newValue = validator.Correct(fieldValue); if (!string.IsNullOrEmpty(newValue)) { XmlDocument xmldoc = new XmlDocument(); xmldoc.LoadXml(newValue); newValue = xmldoc.DocumentElement.InnerText; if (AutoCorrect != null) { AutoCorrectEventArgs args = new AutoCorrectEventArgs(row, ValidatorType.Field, field.Name, fieldValue, newValue); if (AutoCorrect != null) AutoCorrect(this, args); } isValidated = false; } else { ErrorCapturedEventArgs args = new ErrorCapturedEventArgs(row, ValidatorType.Field, vs.ErrorType, field.Name, validator.ToString(vs.Description)); if (ErrorCaptured != null) ErrorCaptured(this, args); } } else { ErrorCapturedEventArgs args = new ErrorCapturedEventArgs(row, ValidatorType.Field, vs.ErrorType, field.Name, validator.ToString(vs.Description)); if (ErrorCaptured != null) ErrorCaptured(this, args); } return isValidated; }