1

Resolved

StringValueAttribute does not allow whitespace-only.

description

There is an unneeded restriction in the StringValueAttribute constructor that disallows null or whitespace strings. However, whitespace is a perfectly legitimate value if you want an enumeration to display as blank.

If nulls or empties cause issues, please change the check from !string.IsNullOrWitespace(value) to !string.IsNullOrEmpty(value). If not, please remove the check entirely.

comments

accessguru wrote Feb 20 at 1:06 PM

Thanks for the feedback. This feature has been released in v1.1.0.0 along with a new NuGet package.

SvdSinner wrote Feb 22 at 7:24 PM

Wow! Thanks for the fast fix!