public virtual object ValidateElement(XmlQualifiedName name, ValidationState context, out int errorCode) {
if (contentType == XmlSchemaContentType.TextOnly || contentType == XmlSchemaContentType.Empty) { //Cannot have elements in TextOnly or Empty content
context.NeedValidateChildren = false;
}
errorCode = -1;
return null;
}