Tuesday, February 27, 2007
Regex | Validate email
There are a number of JavaScript modules available online which validates email address. But there are instances when a valid mail address is also invalidated for e.g. some assume all domains end in .com, .net, .edu, or .org; and other invalidate mail ID with a + in the local-part. RFC 2822 (former RFC 822) describes the format of mail address.
So, here's the JavaScript code to validate the e-mail address as per RFC. Please correct it if there are any discrepancies.
function checkMail(emailAdd)
{
var regExobj = /^[-!#$%&'*+/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+/0-9=?A-Z^_a-z{|}~])*@[a-zA-Z](-?[a-zA-Z0-9])*(\.[a-zA-Z](-?[a-zA-Z0-9])*)+$/;
return(regExobj.test(emailAdd));
}
So, here's the JavaScript code to validate the e-mail address as per RFC. Please correct it if there are any discrepancies.
function checkMail(emailAdd)
{
var regExobj = /^[-!#$%&'*+/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+/0-9=?A-Z^_a-z{|}~])*@[a-zA-Z](-?[a-zA-Z0-9])*(\.[a-zA-Z](-?[a-zA-Z0-9])*)+$/;
return(regExobj.test(emailAdd));
}
.Net Free Charting Solution | ZedGraph
ZedGraph is a set of classes, written in C#, for creating 2D line and bar graphs of arbitrary datasets. The classes provide a high degree of flexibility -- almost every aspect of the graph can be user-modified. At the same time, usage of the classes is kept simple by providing default values for all of the graph attributes. The classes include code for choosing appropriate scale ranges and step sizes based on the range of data values being plotted.
ZedGraph also includes a UserControl interface, allowing drag and drop editing within the Visual Studio forms editor, plus access from other languages such as C++ and VB. ZedGraph is licensed under the LGPL.
ZedGraph Home Page: http://zedgraph.org/wiki/index.php?title=Main_Page
ZedGraph Tutorial: http://codeproject.com/csharp/zedgraph.asp
Subscribe to:
Posts (Atom)