1

I just want to ask about my problem. I am getting this error

Uncaught ReferenceError: jQuery is not defined jquery.validationEngine-en.js:192
Uncaught ReferenceError: jQuery is not defined 
Uncaught TypeError: Object [object Object] has no method 'validationEngine'

When I tried to validate my form using jquery validation engine plugin. I followed the instruction but I don't know why am I getting this error. I also double check the path and it is working also. Here's my sample code:

<html>
    <head>
        <title>TEST</title>

        <script type='text/javascript' src='http://localhost/mycrud/./third_party/jquery-validation/js/languages/jquery.validationEngine-en.js'></script>
        <script type='text/javascript' src='http://localhost/mycrud/./third_party/jquery-validation/js/jquery.validationEngine.js'></script>
        <link rel='stylesheet' type='text/css' href='http://localhost/mycrud/./third_party/jquery-validation/css/validationEngine.jquery.css' />

        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

    </head>
    <body>

        <form id="formID" method="post" action="submit.action">
            <input value="[email protected]" class="validate[required,custom[email]]" type="text" name="email" id="email" />
        </form>

        <script type="text/javascript">
            $(document).ready(function(){
                $("#formID").validationEngine();
            });
        </script>

    </body>

</html>
1
  • You need to load jquery before you load the jquery plugin. Commented Oct 29, 2013 at 1:10

1 Answer 1

2

Load your jQuery library at the top before loading validation script.

As it has has dependencies on jQuery library so you can not use $ or jQuery before defining them so load library first.

Load this way :

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type='text/javascript' src='http://localhost/mycrud/./third_party/jquery-validation/js/languages/jquery.validationEngine-en.js'></script>
<script type='text/javascript' src='http://localhost/mycrud/./third_party/jquery-validation/js/jquery.validationEngine.js'></script>
<link rel='stylesheet' type='text/css' href='http://localhost/mycrud/./third_party/jquery-validation/css/validationEngine.jquery.css' />
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.