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

I need to evaluate certain properties of a page whenever it's being saved/published as part of a custom validation I need to implement.

I notice properties has both Cancel and ErrorMessage properties but as you can guess these aren't really appropriate for validation and showing a message to the user while they can still see the page.

Using an event receiver is preferable but I'm open to other server-side options.

share|improve this question

1 Answer 1

The problem is that the user will get really unhappy if they spent ages entering content which then disappears if they made a mistake on another field. What is the validation you are doing that means you have to leave the page rather than use normal in page validation?

share|improve this answer
    
But I can still call the base ItemUpdating method by all means and use the beforeProperties/afterProperties to only save the relevant fields. In answer to your question - I need to conditionally mandate certain fields. So, for example, depending on the value of one property - another may be required, may not. Thanks a lot for your reply. –  DeeMac Jul 16 '12 at 14:35

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.