1

I'm try to using validation InputFormRegularExpressionValidator. Code behind

<SharePoint:InputFormTextBox runat="server" id="TitleTB"__designer:bind="ddwrt:DataBind('i',concat('ff1',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Title')}"/>
<SharePoint:InputFormRegularExpressionValidator ID="Validator" runat="server"
                         Display="Dynamic" SetFocusOnError="true"
                         ControlToValidate="TitleTB"
                         ValidationExpression="^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]$"
                         ErrorMessage="Enter a valid email address." />

Validation is always fired regardless of the input.

4
  • Where is the solve: social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/…
    – IAfanasov
    Jul 2, 2011 at 10:00
  • Since you found the answer, do you mind if we delete this question?
    – Kit Menke
    Jul 28, 2011 at 13:58
  • i think it question be helpfull to other developers
    – IAfanasov
    Aug 4, 2011 at 11:39
  • Oh, I agree it is helpful. I was just asking because you have it duplicated in two places (here and msdn forums). Would you want to post the answer here as well?
    – Kit Menke
    Aug 4, 2011 at 14:05

1 Answer 1

1

it was problem with regex. The right is ^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+.[A-Za-z]$ thank to Wayne Fan

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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