I am using a regular expression for email validation and to limit the number of character in SharePoint edit form (data form webpart)
<asp:TextBox runat="server" id="ff58{$Pos}" ControlMode="Edit" FieldName="Email" text="{@FileLeafRef}" __designer:bind="{ddwrt:DataBind('u',concat('ff58',$Pos),'Text','TextChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@FileLeafRef')}" />
<SharePoint:InputFormRegularExpressionValidator ID="Validator" runat="server" Display="Dynamic" SetFocusOnError="true"
ControlToValidate="ff58{$Pos}"
ValidationExpression="^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$"
ErrorMessage="Enter a valid email address." />
In validationExpression, it does not allow me to use '{
' and it thinks it is a Xpath expression. If I am not using '{
' in expression it works fine.
In Design view of form, it shows an error :
Failed setting processor stylesheet : 0x80004005 : Expected token '}' found ','. ^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2-->,<--4}$"
Also, I want to limit the number of characters to 90 in another field and found this expression - /^[a-zA-Z]{1,90}$/ Is there any regular expression that I can use to limit the number of character validation which does not have { and, for it? or any way to use { and, in SharePoint form