none
How to restrict special characters entry in Sharepoint site RRS feed

  • Question

  • Hi,

    I want to restrict special characters entry in the sharepoint site of list, Announcements, file name and so on..
    can anybody guide me on this regard?

    Thank you so for help in advance.

    Regards
    Geetha
    Friday, April 24, 2009 7:25 AM

Answers

  • You could use an event receiver to analyze the posted data and strip any special characters or cancel the add/update events.  You could also use custom field types or customize the page using SPD to add some validation logic client side.
    Gary Lapointe, Blog: http://stsadm.blogspot.com/, Twitter: http://twitter.com/glapointe
    • Marked as answer by Lu Zou-MSFT Monday, May 4, 2009 11:36 AM
    Saturday, April 25, 2009 8:23 PM
  • To add to Gary's suggestion, theres an old but good posting about another approach also shown here:

    http://sharingpoint.blogspot.com/2005/11/extreme-sharepoint-design-validating.html

    Juts a warning that any client side approach won't help you if someone tries to use webservices to create or populate lists as this would not then activate.  See here for an example of intercepting illegal chars in webservices or object calls:
    http://www.moss2007.be/blogs/vandest/archive/2007/07/24/illegal-characters-in-site-url.aspx

    Regards

    John Timney (MVP)
    • Marked as answer by Lu Zou-MSFT Monday, May 4, 2009 11:36 AM
    Saturday, April 25, 2009 10:24 PM

All replies

  • You could use an event receiver to analyze the posted data and strip any special characters or cancel the add/update events.  You could also use custom field types or customize the page using SPD to add some validation logic client side.
    Gary Lapointe, Blog: http://stsadm.blogspot.com/, Twitter: http://twitter.com/glapointe
    • Marked as answer by Lu Zou-MSFT Monday, May 4, 2009 11:36 AM
    Saturday, April 25, 2009 8:23 PM
  • To add to Gary's suggestion, theres an old but good posting about another approach also shown here:

    http://sharingpoint.blogspot.com/2005/11/extreme-sharepoint-design-validating.html

    Juts a warning that any client side approach won't help you if someone tries to use webservices to create or populate lists as this would not then activate.  See here for an example of intercepting illegal chars in webservices or object calls:
    http://www.moss2007.be/blogs/vandest/archive/2007/07/24/illegal-characters-in-site-url.aspx

    Regards

    John Timney (MVP)
    • Marked as answer by Lu Zou-MSFT Monday, May 4, 2009 11:36 AM
    Saturday, April 25, 2009 10:24 PM
  • HI,

    The first link can not implemented for the MOSS 2007.
    Can anybody guide on validating for special characters for existing and new list & document libraries.

    Thank you so much for the help in advance

    Regards
    Geetha

    Monday, May 4, 2009 12:24 PM