Creating a not-empty GUID validation attribute and a not-default validation attribute

Published: 15/03/2019
Creating a not-empty GUID validation attribute and a not-default validation attribute
Source: DOTNETKICKS.COM

In this post I describe a handy validation attribute used during ASP.NET Core model binding for verifying that a GUID doesn't have the default value of Guid.Empty. I always find myself re-creating it in projects, so now I can just copy it from here! You might be wondering why a "not-empty" attribute is necessary.

Read more
Related news
Comment
Latest in blog
FACEBOOK