Dimi
  •  Dimi
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
2011-05-16T17:10:26Z
I got a new user who first entered incorrect email address, then after he didnt' receive email address he registered one more record this time using a correct email address. I'm sure it would be great to add a simple filter to the email text box control to check if the entered string can be email address or not. It should be written in JS, but if it's easier it can also be done in C# and it should shoot when the user wants to change or enter email address.

The address string:

1. Cannot be blank.
2. The length cannot be less than 5 characters, it's obvious: A@B.C.
2. Should include @.
3. Should include at least one dot.
4. The dot and the @ sign cannot be at the first or last position of email address.
5. The email address cannot have space and other restricted characters.
Dimi
UserPostedImage
Sponsor
tha_watcha
2011-05-19T12:46:46Z
Originally Posted by: Dimi 

I got a new user who first entered incorrect email address, then after he didnt' receive email address he registered one more record this time using a correct email address. I'm sure it would be great to add a simple filter to the email text box control to check if the entered string can be email address or not. It should be written in JS, but if it's easier it can also be done in C# and it should shoot when the user wants to change or enter email address.

The address string:

1. Cannot be blank.
2. The length cannot be less than 5 characters, it's obvious: A@B.C.
2. Should include @.
3. Should include at least one dot.
4. The dot and the @ sign cannot be at the first or last position of email address.
5. The email address cannot have space and other restricted characters.



Agree its a absolutely must to have a validation for emails, which is already implement when changing the email adress on the profile page.

I added this now also to the register page will be included in 1.9.5.6. S simple RegularExpression Validator does the job

^([0-9a-z]+[-._+&])*[0-9a-z]+@([-0-9a-z]+[.])+[a-z]{2,6}$

UserPostedImage

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved