-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
area-System.ComponentModel.DataAnnotationsbugdisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issuehelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors
Milestone
Description
Method EnsureValidDataType() should not raise an exception when the property CustomDataType is a WhiteSpace?
This code:
/// <summary>
/// Throws an exception if this attribute is not correctly formed
/// </summary>
/// <exception cref="InvalidOperationException"> is thrown if the current attribute is ill-formed.</exception>
private void EnsureValidDataType()
{
if (DataType == DataType.Custom && string.IsNullOrEmpty(CustomDataType))
{
throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture,
SR.DataTypeAttribute_EmptyDataTypeString));
}
}Should be?
/// <summary>
/// Throws an exception if this attribute is not correctly formed
/// </summary>
/// <exception cref="InvalidOperationException"> is thrown if the current attribute is ill-formed.</exception>
private void EnsureValidDataType()
{
if (DataType == DataType.Custom && string.IsNullOrWhiteSpace(CustomDataType))
{
throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture,
SR.DataTypeAttribute_EmptyDataTypeString));
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.ComponentModel.DataAnnotationsbugdisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issuehelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors