// Description: This file is for generic javascript functions related
// to user input.

// This function checks a string.  It returns null if the string is a valid 
// password, otherwise it returns an error string.
function checkPasswordLength(pass) {
// The password must be 4 characters or longer.
	if(pass.length < 4) {
		return "Password must be four characters or more";
	}
	return null;
}
// This function checks that an email address in in the correct format.
// It returns null if the string is a valid email address, otherwise
// it returns an error message.
function checkEmailFormat(address) {
	var expression = /^.+@.+\..{2,3}/
	if(!expression.test(address)) {
		return "Malformed email address"
	}
	return null;
}

// This function parses a phone number with hyphens, spaces, etc. and
// returns an all numberic number.
function parsePhoneNum(phoneNumber) {
    
}

