Hello,
You can this article it is very good with respect to learn how to validate user input
 
https://www.codeproject.com/articles/1116318/points-to-secure-your-asp-net-mvc-applications
 
Thanks