Relaxed email validation regex.

This commit is contained in:
Dario Solera 2010-02-09 12:30:45 +00:00
parent a5aeafc80e
commit 5774c21f2b
2 changed files with 3 additions and 4 deletions

View file

@ -16,5 +16,5 @@ using System.Reflection;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("3.0.1.474")]
[assembly: AssemblyFileVersion("3.0.1.474")]
[assembly: AssemblyVersion("3.0.1.475")]
[assembly: AssemblyFileVersion("3.0.1.475")]

View file

@ -95,7 +95,7 @@ namespace ScrewTurn.Wiki {
/// Gets the Email validation Regex.
/// </summary>
public static string EmailRegex {
get { return @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})$"; }
get { return @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,5}|[0-9]{1,3})$"; }
}
/// <summary>
@ -116,7 +116,6 @@ namespace ScrewTurn.Wiki {
/// Gets the SMTP Server validation Regex.
/// </summary>
public static string SmtpServerRegex {
//get { return @"^(?:[a-zA-Z0-9_\-]{1,63}\.?)+(?:[a-zA-Z]{2,})|(?=\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})[0-2]*[0-9]*[0-9]+\.[0-2]*[0-9]*[0-9]+\.[0-2]*[0-9]*[0-9]+\.[0-2]*[0-9]*[0-9]+$"; }
get { return @"^[A-Za-z0-9\.\-_]+$"; }
}