Entity Framework data validation

Sometimes we need to validate Entity/Data(class) in EntityFramework to make data is clean and perfect for submitting to Database server so that it won't create problem later. Below link provides how to implement validation in different ways.
 
https://www.simple-talk.com/dotnet/.net-framework/catching-bad-data-in-entity-framework/