
$(document).ready(function() {
    
    $("#forgot_submit").click(function() {
        var email = $("#loginId").val();
        email = $.trim(email);
        // restrict special chars
        if (! email.match(/^([a-zA-Z]([-._][a-zA-Z0-9]+)*)+([a-z0-9A-Z]([-._]?[a-z0-9A-Z]))*@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/)) {
            alert ("Please enter valid Username");
            return false;
        }

        return true;
    });
});