hereis my code the html is on http://cdpn.io/rzcAu
/**************************************************************************
validation
***************************************************************************/
/*********validation Variables************/
var Email = document.getElementsByName("Email");
var Password = document.getElementsByName("Password");
var firstName = document.getElementsByName("FirstName");
var secondName = document.getElementsByName("SecondName");
var Captcha = document.getElementsByName("Captcha");
var name = document.getElementsByName("Name");
var Subject = document.getElementsByName("Subject");
var Message = document.getElementsByName("Message");
/*********validation Code************/
function email_validation(){
if (Email.length == ""){
alert("Empty field");
}
if ((Email.length < 5) && (Email < "@" ) &&(Email < ".")){
alert("invalid format");
}
}
function name_validation(){
if(name.length === ""){
alert("value not entered");
if(name === number){
alert("invalid format");
}
}
}
function captcha_validation(){
if(Captcha.length === ""){
alert("value not entered");
}
}
function password_validation(){
if(Password.length === ""){
alert("value not entered");
}
}
function firstName_validation(){
if(firstName.length === ""){
alert("value not entered");
}
}
function secondName_validation(){
if(secondName.length === ""){
alert("value not entered");
}
}
function subject_validation(){
if(subject.length === ""){
alert("value not entered");
}
}
function subject_validation(){}
}