JavaScript coding available to crm validate email address

Asked By 30 points N/A Posted on -
qa-featured

I like to create ASP.NET file customer page in CRM 4.0, I need the CRM validate email address in text box control function similar with what is in CRM 4.0. I want to know the technique an if the coding in JavaScript for email validation is available.

SHARE
Answered By 0 points N/A #164000

JavaScript coding available to crm validate email address

qa-featured

Email validation with Javascript is simple. Javascript only validates the correct format of an email address, it will not be able to validate if the address is actually present or not. Following is a code snippet of Javascript email validation.

function ValidateEmailAddress( myInput)

{

var format = /^w+([.-]?w+)*@w+([.-]?w+)*(.w{2,3})+$/;

if(myInput.value.match(format))

{

return true;

}

else

{

alert("You have entered an invalid email address!");

return false;

}

}

In place of an alert, you can use any kind of error message notification as you desire.

Related Questions