Powerful jQuery Bootstrap Form Validation with Example

Powerful jQuery Bootstrap Form Validation with Example

Powerful jQuery Bootstrap Form Validation with Example

Here is another example to validate your bootstrap form using jquery. This is very simple and user friendly plugins to validate your bootstrap form with additional features.

Using this plugin you can validate form easily.

This will shows you error icon and success icon too.

Here is a sample form to validate via jquery bootstrap validator.


  1. {!! Form::open(array('route' => 'your route','method'=>'POST','files'=>true,'id'=>'myform')) !!}
  2. <div class="col-xs-12 col-sm-12 col-md-12">
  3. <div class="form-group">
  4. <strong>Name:</strong>
  5. {!! Form::text('name', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
  6. {!! $errors->first('name', '<p class="alert alert-danger">:message</p>') !!}
  7. </div>
  8. </div>
  9. <div class="col-xs-12 col-sm-12 col-md-12">
  10. <div class="form-group">
  11. <strong>Email:</strong>
  12. {!! Form::text('email', null, array('placeholder' => 'Email','class' => 'form-control')) !!}
  13. {!! $errors->first('email', '<p class="alert alert-danger">:message</p>') !!}
  14. </div>
  15. </div>
  16. <div class="col-xs-12 col-sm-12 col-md-12">
  17. <div class="form-group">
  18. <strong>Phone:</strong>
  19. {!! Form::text('phone', null, array('placeholder' => 'Mobile No','class' => 'form-control')) !!}
  20. {!! $errors->first('phone', '<p class="alert alert-danger">:message</p>') !!}
  21. </div>
  22. </div>
  23. <div class="col-xs-12 col-sm-12 col-md-12">
  24. <div class="form-group">
  25. <strong>Details:</strong>
  26. {!! Form::textarea('details', null, array('placeholder' => 'Details','class' => 'form-control','style'=>'height:100px')) !!}
  27. {!! $errors->first('details', '<p class="alert alert-danger">:message</p>') !!}
  28. </div>
  29. </div>
  30. <div class="col-xs-12 col-sm-12 col-md-12 text-center">
  31. <button type="submit" class="btn btn-primary">Submit</button>
  32. </div>
  33. {!! Form::close() !!}

Now lets add some scipt to validate this form.


  1. $(document).ready(function() {
  2. $('#myform').bootstrapValidator({
  3. message: 'This value is not valid',
  4. feedbackIcons: {
  5. valid: 'glyphicon glyphicon-ok',
  6. invalid: 'glyphicon glyphicon-remove',
  7. validating: 'glyphicon glyphicon-refresh'
  8. },
  9. fields: {
  10. name: {
  11. validators: {
  12. notEmpty: {
  13. message: 'Please enter your full name'
  14. }
  15. }
  16. },
  17. details: {
  18. validators: {
  19. notEmpty: {
  20. message: 'Please enter your details'
  21. }
  22. }
  23. },
  24. email: {
  25. validators: {
  26. notEmpty: {
  27. message: 'Please enter your email'
  28. }, emailAddress: {
  29. message: 'The value is not a valid email address'
  30. }
  31. }
  32. },
  33. phone: {
  34. validators: {
  35. notEmpty: {
  36. message: 'Please enter your phone no.'
  37. },
  38. digits: {
  39. message: 'The mobile phone number is not valid'
  40. },
  41. stringLength: {
  42. min: 10,
  43. max: 11,
  44. message: 'The phone no. must be 10 digits'
  45. }
  46. }
  47. },
  48. }
  49. });
  50. });

Don't forget to add library to validate form.

<script src="http://demo.expertphp.in/js/validator.js"></script>

Phone: (+91) 8800417876
Noida, 201301
ataşehir escort maltepe escort bostancı escort kadıköy escort maltepe escort ataşehir escort tuzla escort pendik escort ümraniye escort kartal escort
pendik escort
izmir escort izmir escort izmir escort izmir escort denizli escort antalya escort antalya escort antalya escort izmir escort izmir escort izmir escort izmir escort izmir escort
hatay escort nevsehir escort nigde escort kirikkale escort batman escort osmaniye escort kirklareli escort tokat escort rize escort adiyaman escort gumushane escort batman escort
porno izle
cialis satış cialis fiyat cialis 20 mg cialis 100 mg cialis 5 mg fiyat
sohbet okey oyna
ankara escort marmaris escort bursa escort mersin escort antalya escort izmir escort samsun escort bodrum escort çeşme escort kuşadası escort adana escort eskişehir escort gaziantep escort esenyurt escort pendik escort tuzla escort fatih escort ümraniye escort mecidiyeköy escort kartal escort bahçelievler escort bahçeşehir escort ataşehir escort bakırköy escort nişantaşı escort avcılar escort büyükçekmece escort kurtkoy escort konya escort beşiktaş escort taksim escort beylikdüzü escort malatya escort sakarya escort şişli escort maltepe escort kadıköy escort ataköy escort bostancı escort şirinevler escort bağcılar escort üsküdar escort etiler escort başaksehir escort ortaköy escort kağıthane escort sultangazi escort halkalı escort çekmeköy escort şaşkınbakkal escort mamak escort sincan escort keçiören escort çankaya escort beypazarı escort akyurt escort pursaklar escort kahramankazan escort göztepe escort alsancak escort bornova escort buca escort karabaglar escort karşıyaka escort konak escort narlıdere escort izmit escort başiskele escort kandira escort körfez escort karamürsel escort dilovası escort gölcük escort gebze escort kocaeli escort kayseri escort elazığ escort denizli escort diyarbakir escort adana escort ankara escort izmir escort antalya escort gaziantep escort kayseri escort konya escort mersin escort denizli escort kocaeli escort diyarbakır escort