0

¿por que el plugin formvalidation.io me envía este error: Uncaught TypeError: (...).formValidation is not a function?

Anteriormente estaba usando la plantilla Sb Admin 2, migre a la plantilla AdminLTE 2 y no me funciona este plugin. ¿alguna razón por la cual la diferencia de plantilla sea la causa o tendré algún error que no logro ver?

Actualización 1:

En el head:

<!-- jQuery 2.2.4 -->
    <script src="{{ asset('/js/jquery.min.js') }}"></script>
    
    <!-- Bootstrap 3.3.2 JS -->
    <script src="{{ asset('/js/bootstrap.min.js') }}" type="text/javascript"></script>
    
    <!-- Bootstrap 3.3.4 -->
    <link href="{{ asset('/css/bootstrap.min.css') }}" rel="stylesheet" type="text/css" />

    <!-- Theme style -->
    <link href="{{ asset('/css/AdminLTE.css') }}" rel="stylesheet" type="text/css" />

    <!-- Font Awesome Icons -->
    <link href="{{ asset('/font-awesome/css/font-awesome.min.css') }}" rel="stylesheet" type="text/css" />

    <!-- Ionicons -->
    <link href="{{ asset('/ionicons/ionicons.min.css') }}" rel="stylesheet" type="text/css" />

    <!-- CSS Personal --> 
    <link href="{{ asset('/css/style.css') }}" rel="stylesheet" type="text/css" />

    <!-- FormValidation CSS 0.8.1 -->
    <link rel="stylesheet" href="formValidation/formValidation.min.css">

    <!-- FormValidation JS 0.8.1 -->
    <script type="text/javascript" src="formValidation/formValidation.min.js"></script>
    <script type="text/javascript" src="formValidation/bootstrap.min.js"></script>

    <!-- AdminLTE Skins. We have chosen the skin-blue-light for this starter
          page. However, you can choose any other skin. Make sure you
          apply the skin class to the body tag so the changes take effect.
    -->
    <link href="{{ asset('/css/skins/skin-blue-light.css') }}" rel="stylesheet" type="text/css" />

    <!-- Alertify JavaScript -->
    <!-- <script src="//cdn.jsdelivr.net/alertifyjs/1.8.0/alertify.min.js"></script> -->
    {!!Html::script('alertifyjs/alertify.min.js')!!}

    <!-- CSS -->
    <!-- <link rel="stylesheet" href="//cdn.jsdelivr.net/alertifyjs/1.8.0/css/alertify.min.css"/> -->
    {!!Html::style('alertifyjs/css/alertify.min.css')!!}
    <!-- Bootstrap theme -->
    <!-- <link rel="stylesheet" href="//cdn.jsdelivr.net/alertifyjs/1.8.0/css/themes/bootstrap.min.css"/> -->
    {!!Html::style('alertifyjs/css/bootstrap.min.css')!!}
    
    <!-- DataTables CSS 1.10.12 -->
    <!-- <link href="https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css" rel="stylesheet"/> -->
    {!!Html::style('datatables/jquery.dataTables.min.css')!!}

    <!-- Bootstrap Toggle Responsive 2.2.2 -->
    <!-- <link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet"> -->
    {!!Html::style('bootstrap-switch/bootstrap-toggle.min.css')!!}
    
    <!-- Include Bootstrap Combobox -->
    <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-combobox/1.1.7/css/bootstrap-combobox.css"> -->
    <link rel="stylesheet" href="bootstrap-combobox/bootstrap-combobox.css">
    
    <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-combobox/1.1.7/js/bootstrap-combobox.js"></script> -->
    <script type="text/javascript" src="bootstrap-combobox/bootstrap-combobox.js"></script>

    <link rel="stylesheet" href="css/hint.min.css">

Antes del body:

    <!-- jQuery 2.2.4 -->
    <script src="{{ asset('/js/jquery.min.js') }}"></script>
    
    <!-- Bootstrap 3.3.2 JS -->
    <script src="{{ asset('/js/bootstrap.min.js') }}" type="text/javascript"></script>

    <!-- REQUIRED JS SCRIPTS -->
    <!-- AdminLTE App -->
    <script src="{{ asset('/js/app.min.js') }}" type="text/javascript"></script>

    <!-- DataTables 1.10.12 -->
    <!-- <script src="//cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script> -->
    {!!Html::script('datatables/jquery.dataTables.min.js')!!}
     
    <!-- Bootstrap Toggle Responsive 2.2.2 -->
    <!-- <script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script> -->
    {!!Html::script('bootstrap-switch/bootstrap-toggle.min.js')!!}

    <!-- Alertify JavaScript -->
    <!-- <script src="//cdn.jsdelivr.net/alertifyjs/1.8.0/alertify.min.js"></script> -->
    {!!Html::script('alertifyjs/alertify.min.js')!!}

    <script>
        alertify.defaults.transition = "slide";
        alertify.defaults.theme.ok = "btn btn-primary";
        alertify.defaults.theme.cancel = "btn btn-danger";
        alertify.defaults.theme.input = "form-control";
    </script>

    <!-- Slimscroll -->
    <script src="plugins/slimScroll/jquery.slimscroll.min.js"></script>
    <!-- FastClick -->
    <script src="plugins/fastclick/fastclick.js"></script>

    <script src="js/script.js"></script>

1 respuesta 1

1

¿Estás llamando a jQuery dos veces? Parece que tienes una llamada en el header y otra "antes del body" La doble llamada puede estar causando tu problema.

2
  • no se cuantas veces intente mover el jQuery de lugar (antes y despues de cada uno de los plugin a ver) y en eso no me fije que lo copie 2 veces. Tuve que dejar el primer jQuery del head y me funciona perfecto. Gracias.
    – bypabloc_
    el 7 ene. 2017 a las 22:39
  • De nada Pablo, estas cosas pasan ;) el 8 ene. 2017 a las 9:06

Tu Respuesta

Al pulsar en “Publica tu respuesta”, muestras tu consentimiento a nuestros términos de servicio, política de privacidad y política de cookies

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.