mardi 19 juin 2018

jquery validation in textfield

I got plugin(jquery form validator) when i was surf in google, I want to make form validation, plugin use in form validation, its work perfect but In console show error,

jquery.form-validator.min.js:9 Uncaught TypeError: Cannot read property 'length' of undefined
at HTMLDocument.f (jquery.form-validator.min.js:9)
at HTMLDocument.dispatch (jquery.js:3)
at HTMLDocument.r.handle (jquery.js:3)
at Object.trigger (jquery.js:3)
at m.fn.init.triggerHandler (jquery.js:3)
at Function.ready (jquery.js:2)
at HTMLDocument.J (jquery.js:2)

$.validate({
  form: '#form',
  modules: 'location, date, security, file',
});

// Restrict presentation length
$('#presentation').restrictLength($('#pres-max-length'));

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"></script>

<div class="form-group col-lg-5">
  {!! Form::label('quantities', 'Traded Quantity:') !!} {!! Form::text('quantities', null, ['class'=>'form-control', 'data-validation'=>'length number', 'data-validation-length'=>'3-12', 'data-validation-error-msg'=>'User name has to be an alphanumeric
  value (3-12 chars)'])!!}
</div>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire