<?php
class checkFormat{
function checkEmailFormat($email){
	if(!preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $email)) { 
		return false;
	}else{
		return true;
	}
}

function checkPhoneFormat($phone){
	if (!preg_match('/^\d{2}\d{3}\d{3}(\d{2})?$/',$phone) && !preg_match("/^([1]-)?[0-9]{3}-[0-9]{3}-[0-9]{4}$/i",$phone)) {
		return false;
	}else{
		return true;
	}
}

function checkPasswordFormat($pass){
    if (!preg_match("/^[a-z0-9_-]{6,100}$/i", $pass)) {             //password contains letters, numbers and the length is b/w 6 and 40
        return false;
    }else{
        return true;
    }
}
}
?>