Base solution for your next web application
Open Closed

Custom Validations C# #2456


User avatar
0
rev319303 created

How do you handle custom c# validations? Do you have a standard way you do this or do I just need to handle this myself?

if(inputDto.blah  ==  "OhNo")
{
    //Throw some custom error back to the user
   throw new Exception("blah cannot equal OhNo");
}

1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Please check this document <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Validating-Data-Transfer-Objects#DocCustomValidation">http://aspnetboilerplate.com/Pages/Docu ... Validation</a>