Easy Form Validation Plugin For Bootstrap 4 jQuery s validatejs - Download Easy Form Validation Plugin For Bootstrap 4 - jQuery s-validatejs

Download Easy Form Validation Plugin For Bootstrap 4 – jQuery s-validatejs

Posted on

This time I will share jQuery Plugin and tutorial about Easy Form Validation Plugin For Bootstrap 4 – jQuery s-validatejs, hope it will help you in programming stack.

Easy Form Validation Plugin For Bootstrap 4 jQuery s validatejs - Download Easy Form Validation Plugin For Bootstrap 4 - jQuery s-validatejs

File Size: 16.1 KB
Views Total: 16460
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

s-validatejs is a super tiny jQuery plugin that provides the client-side form field validation for the latest Bootstrap 4 framework.

Validation rules supported:

  • Email address.
  • Password.
  • Required field.
  • Min number of required chars.

How to use it:

1. Import the jQuery s-validatejs plugin’s script into your Bootstrap project.

1 <!-- Bootstrap files -->
2 <link rel="stylesheet" href="/path/to/bootstrap.min.css">
3 <script src="/path/to/query.min.js"></script>
4 <script src="/path/to/tether.min.js"></script>
5 <script src="/path/to/bootstrap.min.js"></script>
6  
7 <!-- jQuery s-validatejs -->
8 <script src="svd.js"></script>

2. Create a message container to display the success message when all the form fields are valid.

1 <div id="message">
2   <div class="alert alert-success" role="alert">
3   <strong>Well done!</strong> You send message!
4   </div>
5 </div>
6  
7 <!-- jQuery s-validatejs -->
8 <script src="svd.js"></script>
1 #message{
2   display: none;
3 }

3. Setup the form validation plugin and customize the error messages.

01 var settings = {
02  
03     // set #id for validation email
04     emailID: '#inputEmail',
05  
06     // set text for validation email
07     ErrorTextEmail: 'Enter valid email',
08  
09     // set #id for validation password
10     passwordID: '#inputPassword',
11  
12     // set text for validation password
13     ErrorTextPassword: 'Must be 7-20 characters long.',
14  
15     // set value required chars for validation password
16     MinCharsPass: '7',
17  
18     // set #id for validation custom
19     Custom: '#inputCustom',
20  
21     // set text for validation password
22     ErrorTextCustom: 'Must be 5-20 characters long custom.',
23  
24     // set value required chars for validation custom form
25     MinCharsCustom: '5'
26      
27 }

Change log:

2017-08-06

  • JS update

This awesome jQuery plugin is developed by SergeIpatyev. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net