I've dived into javascript & jquery for the first time and I'm having a little difficulty wrapping my head around a problem.
fieldedit.php
<div class="editinput-body">
    <form id="edit_field_form"  class="form-horizontal" action="field.php" method="post">
        <div class="form-group">
            <input type="text" maxlength="10" class="form-control" name="field_name" id="edit_field" value="" validFieldName/>
        </div>
    </form>
</div>
<div class="editinput-footer">
    <button type="button" class="btn btn-default" onclick="closeEdit()">Close</button>
    <button type="button" class="btn btn-primary" id="editsubmit" onclick="submitEdit()">Edit</button>
</div>
editvalidator.js
function submitEdit() 
{    
    var formValidator = $('#edit_field_form').validate();
    var success = false;
    try 
    {
        formValidator.addMethod("validFieldName", function (value, element) 
        {
            return false;
        }, jQuery.validator.format("INVALID."));
        success = formValidator.form();
    }
    catch(err) 
    {
        alert("Error\n\n" + err);
    }
}
The formValidator.addMethod throws the error "TypeError: Undefined is not a function".
I'm using jquery-1.9.1.min.js and jquery.validate.min.
Any help would be greatly appreciated.
 
    