Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

On a SharePoint Foundation 2010 installation, I have a list defined and have set some simple validation rules on a couple of the fields:

  • Text field (required)
  • Number field (required, min: 50, max: 100)

These have been set up in the UI and are the out-of-the-box options rather than specifying a custom validation formula.

When I modify a list item through my web browser, the validation rules trigger and I am unable to save the item. However, if I connect to the server via the Managed .NET Client Object Model, I am able to bypass all validation and create new items that violate the rules specified above.

Is there a way to ensure that updates via the Client Object Model are subject to the same rules as the web site?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Edward,

AFAIK.. for Client Object Model, SP considers that you will do all validations through code... Since if you think technically what does SharePoint do when you put a validation, it updates the List Form and add a Validator control...

Now when you are adding the item via Client Object Model, you can use your own Custom Validations...

However, one to make sure the validations are always checked either you add from SharePoint or you add through Client Object Model are to make Event Recievers for the List...

I hope this helps

share|improve this answer
    
So I had wrongly assumed that the validation rules were enfoced at a data store level rather than just in the web UI. –  Edward Jan 23 '13 at 15:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.