I have something like this:
<td>Write your email: >
<asp:RequiredFieldValidator ID="emailRequired" ControlToValidate="from"
ErrorMessage="?" Display="Dynamic" runat="server" CssClass="redNoteTitle"
ToolTip="Write your
email"></asp:RequiredFieldValidator><asp:RegularExpressionValidator
ID="emailRegular" ControlToValidate="from" ErrorMessage="?"
Display="Dynamic" runat="server" ToolTip="Invalid Email"
ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
CssClass="redNoteTitle"></asp:RegularExpressionValidator>
</td>
The part of the form is:
<td><asp:TextBox Columns="31" CssClass="greyNoteText" ID="from"
runat="server" ToolTip="Write your email" /></td>
This is very strange because in the same web site i have other forms with
email validation.
But in this one i get this error. Even more strange is that the problem only
happens with the email validation not with the required field.
I did that you said but that's not the problem.
Do you see anything wrong here?
Thanks,
Miguel
[quoted text, click to view] "Patrice" <nobody@nowhere.com> wrote in message
news:un9RngQWEHA.4024@TK2MSFTNGP09.phx.gbl...
> Found it at :
>
http://www.aspnetemail.com/help/aspnetemail.emailmessage.validateaddress.htm l
[quoted text, click to view] > In this sample they are adding the line just after the object is created.
>
> You could also use another RegExp to take this into account (if you have
> something that doesn't match before the @)
>
> Patrice
>
> --
>
> "Patrice" <nobody@nowhere.com> a écrit dans le message de
> news:uBPjvdQWEHA.4064@TK2MSFTNGP11.phx.gbl...
> > This is in your own code ? What is the class you are using ?
> >
> > It looks like the regular expression doesn't allow a dot before the @
sign
> > (which is sometimes used and works but not allowed in theory).
> >
> > Patrice
> >
> > --
> >
> > "Miguel Dias Moura" <web001@27NOSPAMlamps.com> a écrit dans le message
de
> > news:ONN2TtKWEHA.2288@TK2MSFTNGP10.phx.gbl...
> > > Hello,
> > >
> > > when i uploaded my web site to a server i got this message everytime
> there
> > > was a form with authentication of an email address:
> > >
> > > System.Exception: The FromAddress is not syntactically correct, based
> upon
> > > the pattern set by EmailMessage.ValidateRegEx:
[\w-]+@([\w-]+\.)+[\w-]+
> To
> > > turn preliminary email address syntax checking, set
> > > EmailMessage.ValidateAddress = false.
> > >
> > > My questions are:
> > > - Why does this happen?
> > > - Where and how to i insert this code to solve this problem:
> > > EmailMessage.ValidateAddress = false
> > >
> > > Thanks,
> > > Miguel
> > >
> > >
> > >
> >
> >
>
>