Skip to content

Commit

Permalink
Release v0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nghuuphuoc committed Jul 14, 2014
1 parent bea5602 commit 3e0770a
Show file tree
Hide file tree
Showing 10 changed files with 138 additions and 66 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log

## v0.5.0 (not released yet) - It will be the big release
## v0.5.0 (2015-07-14)

__New Features__
* [#2](https://github.com/nghuuphuoc/bootstrapvalidator/issues/2), [#387](https://github.com/nghuuphuoc/bootstrapvalidator/issues/387): Provide the default error messages
Expand Down
62 changes: 3 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# BootstrapValidator - [v0.4.5](https://github.com/nghuuphuoc/bootstrapvalidator/releases/download/v0.4.5/bootstrapvalidator-dist-0.4.5.zip)
# BootstrapValidator - [v0.5.0](https://github.com/nghuuphuoc/bootstrapvalidator/releases/download/v0.5.0/bootstrapvalidator-dist-0.5.0.zip)

[http://bootstrapvalidator.com](http://bootstrapvalidator.com) - The best jQuery plugin to validate form fields. Designed to use with [Bootstrap 3](http://getbootstrap.com)

Expand All @@ -18,65 +18,9 @@ http://bootstrapvalidator.com/examples/

There are also many examples located in the [demo](demo) directory.

## Next v0.5.0

v0.5.0 is coming soon with the following highlights ([all v0.5.0 features](CHANGELOG.md), if you care about)

* Add events for form ([#121](https://github.com/nghuuphuoc/bootstrapvalidator/issues/121)), field ([#195](https://github.com/nghuuphuoc/bootstrapvalidator/issues/195)), and given validator ([#324](https://github.com/nghuuphuoc/bootstrapvalidator/issues/324))
* [#125](https://github.com/nghuuphuoc/bootstrapvalidator/issues/125): Support dynamic fields
* [#175](https://github.com/nghuuphuoc/bootstrapvalidator/issues/175): Possible to show errors in tooltip or popover
* [#385](https://github.com/nghuuphuoc/bootstrapvalidator/issues/385): Support translating error messages in other languages
* [#387](https://github.com/nghuuphuoc/bootstrapvalidator/issues/387): Provide the default error messages

Please help me by downloading the [latest code](https://github.com/nghuuphuoc/bootstrapvalidator/archive/master.zip) and testing the [v0.5.0 issues](https://github.com/nghuuphuoc/bootstrapvalidator/issues?labels=&milestone=7&page=1&state=open).

## Features

__Code__
- [x] Written from scratch
- [x] Very solid and clean
- [x] The core plugin and validators code are separated

__Bootstrap__
- [x] Designed to use with [Bootstrap 3](http://getbootstrap.com)
- [x] Support almost all [Bootstrap forms](http://getbootstrap.com/css/#forms)
- [x] Support Bootstrap form [validation states](http://getbootstrap.com/css/#forms-control-validation)

__HTML 5__
- [x] Support setting the plugin, validator options via [HTML 5 attributes](http://bootstrapvalidator.com/examples#attribute) prefixed with ```data-bv-```
- [x] Support HTML 5 attributes such as ```min```, ```max```, ```pattern```, ```required```
- [x] Support [HTML 5 input types](http://bootstrapvalidator.com/examples#html5) such as ```color```, ```email```, ```range``` and ```url```

__Validator__
- [x] [46 built-in validators](http://bootstrapvalidator.com/validators/) and counting!
- [x] Easy to [write a new validator](http://bootstrapvalidator.com/developing/)

__Friendly__
- [x] Show [feedback icons](http://bootstrapvalidator.com/settings/#feedback-icons) based on field validity
- [x] Support [Glyphicons](http://getbootstrap.com/components/#glyphicons) and [FontAwesome](http://fontawesome.io/icons) icons
- [x] Focus on the first invalid field
- [x] Don't validate the field if the field length is less than given number using [threshold](http://bootstrapvalidator.com/settings/#threshold) option

__Ajax__
- [x] Support [validating via Ajax](http://bootstrapvalidator.com/validators/remote/)
- [x] Support using Ajax for form submission

__Flexible__
- [x] The elements can be defined by either ```name``` or [CSS selector](http://bootstrapvalidator.com/settings/#selector-example)
- [x] Support multiple elements with the [same name](http://bootstrapvalidator.com/examples/#fields-with-same-name)
- [x] Possible to indicate [excluded](http://bootstrapvalidator.com/settings/#excluded) fields
- [x] Field validators can be enabled/disabled on the fly

__Compatibility__
- [x] We [play nice](http://bootstrapvalidator.com/examples/#compatibility) with popular plugins such as
- [x] [Bootstrap Button](http://getbootstrap.com/javascript/#buttons)
- [x] [Bootstrap Color Picker](http://mjolnic.github.io/bootstrap-colorpicker/) as seen in [```hexColor``` validator example](http://bootstrapvalidator.com/validators/hexColor/#color-picker-example)
- [x] [Bootstrap Datetime Picker](http://eonasdan.github.io/bootstrap-datetimepicker/) as seen in [```date``` validator example](http://bootstrapvalidator.com/validators/date/#date-picker-example)
- [x] [Bootstrap Multiselect](http://davidstutz.github.io/bootstrap-multiselect/)
- [x] [Chosen](http://harvesthq.github.io/chosen/)
- [x] [iCheck](https://github.com/fronteed/iCheck/)
- [x] [Mask](http://igorescobar.github.io/jQuery-Mask-Plugin/)
- [x] [Raty](http://wbotelhos.com/raty)
See [official website[(http://bootstrapvalidator.com) for the full list of features

## Required

Expand All @@ -85,7 +29,7 @@ __Compatibility__

## Download

Latest version: [v0.4.5](https://github.com/nghuuphuoc/bootstrapvalidator/releases/download/v0.4.5/bootstrapvalidator-dist-0.4.5.zip), released on 2014-05-15.
Latest version: [v0.5.0](https://github.com/nghuuphuoc/bootstrapvalidator/releases/download/v0.5.0/bootstrapvalidator-dist-0.5.0.zip), released on 2014-07-14.

For older versions, look at the [Releases](https://github.com/nghuuphuoc/bootstrapvalidator/releases) page.

Expand Down
2 changes: 1 addition & 1 deletion bootstrapValidator.jquery.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bootstrapValidator",
"version": "0.5.0-dev",
"version": "0.5.0",
"title": "BootstrapValidator",
"author": {
"name": "Nguyen Huu Phuoc",
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bootstrapValidator",
"description": "The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3",
"version": "0.5.0-dev",
"version": "0.5.0",
"main": [
"dist/css/bootstrapValidator.css",
"dist/js/bootstrapValidator.js"
Expand Down
122 changes: 122 additions & 0 deletions demo/ajaxSubmit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<!DOCTYPE html>
<html>
<head>
<title>Using Ajax to submit data</title>

<link rel="stylesheet" href="../vendor/bootstrap/css/bootstrap.css"/>
<link rel="stylesheet" href="../dist/css/bootstrapValidator.css"/>

<script type="text/javascript" src="../vendor/jquery/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../vendor/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../dist/js/bootstrapValidator.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<div class="page-header">
<h2>Using Ajax to submit data</h2>
</div>

<form id="defaultForm" method="post" class="form-horizontal" action="ajaxSubmit.php">
<div class="form-group">
<label class="col-lg-3 control-label">Username</label>
<div class="col-lg-5">
<input type="text" class="form-control" name="username" />
</div>
</div>

<div class="form-group">
<label class="col-lg-3 control-label">Email address</label>
<div class="col-lg-5">
<input type="text" class="form-control" name="email" />
</div>
</div>

<div class="form-group">
<label class="col-lg-3 control-label">Password</label>
<div class="col-lg-5">
<input type="password" class="form-control" name="password" />
</div>
</div>

<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<button type="submit" class="btn btn-primary">Sign up</button>
</div>
</div>
</form>
</div>
</div>
</div>

<script type="text/javascript">
$(document).ready(function() {
$('#defaultForm')
.bootstrapValidator({
message: 'This value is not valid',
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
username: {
message: 'The username is not valid',
validators: {
notEmpty: {
message: 'The username is required and can\'t be empty'
},
stringLength: {
min: 6,
max: 30,
message: 'The username must be more than 6 and less than 30 characters long'
},
/*remote: {
url: 'remote.php',
message: 'The username is not available'
},*/
regexp: {
regexp: /^[a-zA-Z0-9_\.]+$/,
message: 'The username can only consist of alphabetical, number, dot and underscore'
}
}
},
email: {
validators: {
notEmpty: {
message: 'The email address is required and can\'t be empty'
},
emailAddress: {
message: 'The input is not a valid email address'
}
}
},
password: {
validators: {
notEmpty: {
message: 'The password is required and can\'t be empty'
}
}
}
}
})
.on('success.form.bv', function(e) {
// Prevent form submission
e.preventDefault();

// Get the form instance
var $form = $(e.target);

// Get the BootstrapValidator instance
var bv = $form.data('bootstrapValidator');

// Use Ajax to submit form data
$.post($form.attr('action'), $form.serialize(), function(result) {
console.log(result);
}, 'json');
});
});
</script>
</body>
</html>
6 changes: 6 additions & 0 deletions demo/ajaxSubmit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
$userName = $_POST['username'];

echo json_encode(array(
'message' => sprintf('Welcome %s', $userName),
));
2 changes: 1 addition & 1 deletion dist/css/bootstrapValidator.min.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* BootstrapValidator (http://bootstrapvalidator.com)
* The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
*
* @version v0.5.0-dev, built on 2014-07-14 10:49:46 AM
* @version v0.5.0, built on 2014-07-14 4:31:02 PM
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2014 Nguyen Huu Phuoc
* @license MIT
Expand Down
2 changes: 1 addition & 1 deletion dist/js/bootstrapValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* BootstrapValidator (http://bootstrapvalidator.com)
* The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
*
* @version v0.5.0-dev, built on 2014-07-14 10:49:46 AM
* @version v0.5.0, built on 2014-07-14 4:31:02 PM
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2014 Nguyen Huu Phuoc
* @license MIT
Expand Down
2 changes: 1 addition & 1 deletion dist/js/bootstrapValidator.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bootstrapValidator",
"version": "0.5.0-dev",
"version": "0.5.0",
"description": "The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3",
"keywords": ["jQuery", "plugin", "validate", "validator", "form", "Bootstrap"],
"author": {
Expand Down

0 comments on commit 3e0770a

Please sign in to comment.