0

I am having trouble figuring out how to validate multiple special characters in SharePoint 2010 when a user inputs a password. The special characters that are allowed are: !@$*#%&^)+ . When i have one IF statement such as: =IF(FIND("#",Password),TRUE) , it works just fine and will inform the user there is no "!" if it isnt entered.

My problem is finding out how to enter in multiple IF statements to valid if any of the following special characters:!@$*#%&^)+ are entered.

If i do a IF statement saying: =IF(OR(FIND("%",Password),TRUE),IF(FIND("^",Password),TRUE) it will only validate and allow passwords when both the %^ specials characters are entered, when it needs only one of the special characters to be correct, not both. Any help would appreciated, thanks!

0

Why not use a regular expression instead?

Wouldn't that be so much easier?

http://www.jslab.dk/tools.regex.php

  • I have little to no experience in Javascript or calling them using a Presavefunction in Sharepoint, much easier for me to write the formula in sharepoint – user38725 Feb 2 '15 at 14:23
  • Is this being done in an application page, infopath form, web part??? You can use a Regex in C# code or in a .Net tag is what I was trying to tell you. aspsnippets.com/Articles/… – jpollar Feb 3 '15 at 14:55
0

The following article seems to address pretty well multiple complex validation scenarios.

Hopefully a link is worth a thousand words in this case!

http://sharepointsolutions.com/sharepoint-help/blog/2011/12/how-to-use-or-type-options-in-sharepoint-2010-column-validation/

  • Thank you for the link, i have already reviewed it but it doesn't like the syntax when i try using the FIND function in an OR statement – user38725 Feb 2 '15 at 14:24

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.