<div class="modal fade" id="CrearAutor" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title caption-subject font-blue-secondary sbold uppercase">Crear Autor</h4>
            </div>
            {{ Form::open(['route' => 'autor.crear','class'=>'form-horizontal','id' => 'form-validation','style'=>'padding: 5px 5px 5px 5px;','enctype'=> 'multipart/form-data']) }}
            {{ csrf_field() }}
            <div class="modal-body">
                <div id="ejemplarinfo">
                    <div class="form-group row">
                        <div class="col-md-3 col-xs-12">
                            <label class = "caption-subject font-blue-secondary sbold">
                                Nombre Completo:
                            </label>
                        </div>
                        <div class="col-md-9 col-xs-12">
                            {!! Form::text('nombres', null, ['class' => 'form-control', 'required' => 'required']) !!}
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="submit" id="submitBtn" class="btn btn-primary ">
                    <span class="ladda-label" >Guardar</span>
                    <span class="ladda-spinner"></span>
                </button>
                <button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">Cancelar</button>
            </div>
            {!! Form::close() !!}
        </div>
    </div>
</div>
<script>
    $("#form-validation").validate(
        {
            rules:{
                nombres:{
                    required:true,
                    pattern: "[a-zA-ZñÑáéíóúÁÉÍÓÚüÜ]{2,25}+[a-zA-ZñÑáéíóúÁÉÍÓÚüÜ]{2,25}+[a-zA-ZñÑáéíóúÁÉÍÓÚüÜ]{2,25}"
                }
            }
//            submitHandler: function (form) {
//                var l = Ladda.create(document.querySelector('#submitBtn'));
//                l.start();
//                form.submit();
//            }
        }
    );


</script>