How to add custom field validator in sharepoint list fields

Posted on 2011-05-12
Last Modified: 2012-05-11
I want to add a compare validator for date comparison between to fields say "Start Date" and "End Date" in a sharepoint list. I have n no of list having different types of validators of their respective fields.Now as in sharepoint development I know to do this by shareponint designer in NewForm or EditForm, but problem is i m having more lists which may increase any time.
So doing for each list each field it is tedious....

Is their any approach to do this by using sharepoint object model.

For your better understanding I just want like this....hit this url's 'Tutorial Tab' -->

I need only what is approach to do this through object model for Date Compare Validator on one list....

Thanks in advance
Sumeet Suvi
Question by:sumeetsuvi
    LVL 14

    Expert Comment

    Comparing b/w fields should be built in 2010 list.
    For more custom (or 2007) approach, try using a list template (maybe created with VS) to create your lists.
    LVL 2

    Accepted Solution

    Thanks for your reply....
    I written that in context of Moss - 2007 ....please send any link or code how to use custom list with validators in WSS Model C# code ....not XML based....
    LVL 2

    Author Closing Comment

    Out of scope now

    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
    Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now