Bootstrap Validator on StringLength

Developer
Size
2,807 Kb
Views
38,456

How do I make an bootstrap validator on stringlength?

What is a bootstrap validator on stringlength? How do you make a bootstrap validator on stringlength? This script and codes were developed by Delano on 19 October 2022, Wednesday.

Bootstrap Validator on StringLength Previews

Bootstrap Validator on StringLength - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Bootstrap Validator on StringLength</title>
</head>
<body> <head> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <!-- Optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"> <script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script> <!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.bootstrapvalidator/0.5.2/css/bootstrapValidator.min.css"/>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.bootstrapvalidator/0.5.2/js/bootstrapValidator.min.js"></script>
</head>
<div class="container-fluid"> <div class="row">
<div class="col-xs-12 col-sm-6 col-md-6 centered-form left "> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title text-center bold"><strong>Track my Order </strong></h3> <div style="float:right; font-size: 80%; position: relative; top:-10px"><a href="#">What's my order number?</a></div> </div> <div class="panel-body"> <form id="ordertracking" role="form"> <div style="margin-bottom: 12px" class="input-group"> <span class="input-group-addon"><strong>@</strong></span> <input id="login-username" type="text" class="form-control" name="email" placeholder="Email"> </div> <div style="margin-bottom: 12px" class="input-group"> <span class="input-group-addon"><i class="glyphicon glyphicon-barcode"></i></span> <input id="login-password" type="text" class="form-control" name="customerNum" placeholder="Customer #"> </div> <button type="submit" class="btn btn-success">Track My Order</button> <hr style="margin-top:10px;margin-bottom:10px;"> <div class="form-group"> </div> </form> </div> </div> </div> <form id="regexpEmailForm" class="form-horizontal"> <div class="form-group"> <label class="col-xs-3 control-label">Email address</label> <div class="col-xs-7"> <input type="text" class="form-control" name="email" /> </div> </div>
</form> <script src="js/index.js"></script>
</body>
</html>

Bootstrap Validator on StringLength - Script Codes JS Codes

$('#ordertracking') .formValidation({ framework: 'bootstrap', icon: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, fields: { email: { validators: { emailAddress: { message: 'The value is not a valid email address' }, regexp: { regexp: '^[^@\\s]+@([^@\\s]+\\.)+[^@\\s]+$', message: 'The value is not a valid email address' } } } } }) .on('err.validator.fv', function(e, data) { // data.bv --> The FormValidation.Base instance // data.field --> The field name // data.element --> The field element // data.validator --> The current validator name if (data.field === 'email') { // The email field is not valid data.element .data('fv.messages') // Hide all the messages .find('.help-block[data-fv-for="' + data.field + '"]').hide() // Show only message associated with current validator .filter('[data-fv-validator="' + data.validator + '"]').show(); } });
});
Bootstrap Validator on StringLength - Script Codes
Bootstrap Validator on StringLength - Script Codes
Home Page Home
Developer Delano
Username Delano83
Uploaded October 19, 2022
Rating 3
Size 2,807 Kb
Views 38,456
Do you need developer help for Bootstrap Validator on StringLength?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Delano (Delano83) Script Codes
Create amazing art & images with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!