I am using the [Required]
data annotation on a string. This works just as intended, however it deems an input just consisting of white space to be invalid.
Is there any way to change this?
There is an AllowEmptyStrings
property on the RequiredAttribute
. See if that helps.
https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.requiredattribute.allowemptystrings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With