locked
Separate class library for validation RRS feed

  • Question

  • User1023981450 posted

    I want to create some webservices for my new project, In that i need to validate the input parameter. instead of writing the validation logic for each parameter, i want to create a separate class library which i can use in some other project also. these validations used to check the zip code and email address like that. So is there any class which i can use directly to do this validation or i do i need to write the entire logic to do the validation?

    Please provide some idea or sample code to do this.

    Thanks in advance.

    Monday, December 28, 2009 9:11 AM

Answers

  • User1753744165 posted

    The Validation Application Block is for server side validations. You decorate your properties of your objects and then you can call a validate method to do the checks.

     

    Nick 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 29, 2009 4:59 PM

All replies

  • User1592241370 posted

    Hi,

    you can use Validation Application Block of Enterprise library

    http://aspalliance.com/1223_Using_the_Enterprise_Library_3_Validation_Block_in_ASPNET.all

    Or open source validation library

    http://tnvalidate.codeplex.com/

    good luck

     

     

     

    Monday, December 28, 2009 10:22 AM
  • User1023981450 posted

    Thanks for your reply.

    We are creating only webservice not UI. So i cant use any validation control and we want to validate the parameter in server side logic.

    Here i can write the validation logic with condition statements. But before doing that i just want to confirm that is there any built in class to achieve the same then i can use that.I think  you can understand my requirement clearly now.

    Please provide some idea to achieve this.


    Monday, December 28, 2009 12:56 PM
  • User1753744165 posted

    The Validation Application Block is for server side validations. You decorate your properties of your objects and then you can call a validate method to do the checks.

     

    Nick 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 29, 2009 4:59 PM