You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the current time it is not possible to use nested Classes for DTOs if
the names are the same.
Example:
public class TestDto{
public class Request{
}
}
thrownewInvalidOperationException(string.Format("Cannot validate instances of type '{0}'. This validator can only validate instances of type '{1}'.",instance.GetType().Name,typeof(T).Name));
50
+
thrownewInvalidOperationException(string.Format("Cannot validate instances of type '{0}'. This validator can only validate instances of type '{1}'.",instance.GetType().GetComplexTypeName(),typeof(T).GetComplexTypeName()));
thrownewInvalidOperationException(string.Format("The validator '{0}' cannot validate members of type '{1}' - the types are not compatible.",childValidator.GetType().Name,rule.TypeToValidate.Name));
123
+
thrownewInvalidOperationException(string.Format("The validator '{0}' cannot validate members of type '{1}' - the types are not compatible.",childValidator.GetType().GetComplexTypeName(),rule.TypeToValidate.GetComplexTypeName()));
0 commit comments