1

Got a script that creates new site collection based on a template (clone site collection). Problem is that some users type in slash / backslash in the title site column, that makes the url wrong.

Is there a way to use Column Validation to validate the input. I don't want the users to write characters that screw up the url, like slash, backslash, questionmark in the title column.

I've tried to put in RegEx without any luck :( [RegularExpression(@"^[^\/]*$")]

0

Just include the / in the character class. But since you are using / as the regex delimiter you need to escape it as well as /. Hope this helps

0

I've tried as many variations of slash / as I can come up with:

  • \2F
  • \002F
  • %2F
  • &#2F;
  • 0x2F
  • ...and more

We simply cannot use these characters in site column names if want to use them in this kind of custom validation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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