Skip to content

Latest commit

 

History

History
687 lines (605 loc) · 87.4 KB

CHANGELOG.md

File metadata and controls

687 lines (605 loc) · 87.4 KB

Change Log

v0.6.0 (not released yet)

New Features

Changes

  • #1167: Remove hexColor validator. Use color validator instead
  • #1272: Change event error.x.x to err.x.x to avoid window.onerror being invoked by jQuery

Add-ons

  • #1116: Showing only one message each time
  • #1126: Required icon
  • #1132: Google reCAPTCHA add-on
  • multilingual add-on

Improvements

Bug Fixes

  • #1101: The cusip validator doesn't work
  • #1102: Fix the date validator issue where accepts 2014-11-1 23: as valid YYYY-MM-DD h:m date
  • #1105: The color validator doesn't provide html5Attributes mapping
  • #1125, #1136: Update Brazil ID validator to support working with Mask plugin, thanks to @jonasesteves
  • #1243: Fix the icon without label class
  • #1267: identical validator allows to compare with any input
  • #1274: Fix validateContainer() to use map value instead of key, thanks to @jasonblalock
  • #1279, #1280: Show the validating icon when the field is being validated, thanks to @tmaly1980

Document

Language Packages

v0.5.3 (2014-11-05)

New Features

Improvements

  • #823: The hexColor validator only accepts 6 hex character values when using HTML 5 type='color' attribute
  • #864: Comma separator handling in greaterThan, lessThan validators, thanks to @mgibas
  • #999, #1048: Replace ',' with '.' to validate decimal numbers correct, thanks to @johanronn77
  • #1002: Put tooltip/popover on bottom if there is not enough space on top, thanks to @jazzzz
  • #1015: The remote validator allows to set data options via HTML attributes, thanks to @jazzzz
  • #1017: Enable validator when setting data-bv-validatorname="data-bv-validatorname", thanks to @jazzzz
  • #1026: Requires jQuery 1.9.1 or higher

Bug Fixes

Document

Language Packages

v0.5.2 (2014-09-25)

New Features

Changes

  • #753: Change the default type of remote validator to GET

Improvements

Bug Fixes

  • #611, #703: Tabs get red even form is valid
  • #612, #740, #741: Fix the emailAddress issue which email@server is not valid email address, thanks to @kromit
  • #687, #711: Keep disabled validators VALID, thanks to @talberti
  • #725: Fix the issue when adding field which does not exist but is already set in "fields" option
  • #732: Fix the issue when removing the radio or checkbox field
  • #746: The form is still submitted when clicking on submit button which is set onclick="return false;"
  • #758: Using notEmpty validator with type="number"
  • #759, #764: The tooltip/popover isn't shown if there is disabled validator. The tooltip/popover is shown automatically when the field gets the focus, thanks to @leedorian
  • #797, #799: Can't validate ipv4 and ipv6 at the same time. Add ip validator test suite, thanks to @Arkni
  • #816: Fix Russian VAT number validator, thanks to @stepin
  • #832: The form won't be validated if the submit button contains a HTML tag

Document

Language Packages

v0.5.1 (2014-08-22)

New Features

Improvements

  • #502: Allowing sites without TLD to pass URI validation, thanks to @troymccabe
  • #549, #600: Change the CSS/JS path in demo/remote.html and demo/message.html, thanks to @leegtang, @Arkni
  • #604: Fix the demo/date.html and demo/tab.html examples, thanks to @Arkni
  • #609: Add content-type header for demo/remote.php, thanks to @etorres
  • #661: Add headers option to the remote validator, thanks to @ryan2049
  • #664: Fix the feedback icon position for Bootstrap 3.2
  • #683: Force the format option to be YYYY-MM-DD when using <input type="date" />
  • #698: Ignore type checking if the file type is empty

Bug Fixes

  • #284, #294, #441, #516, #580: The HTML 5 <input type="number" /> input allows to input non-digits characters
  • #548: Fix the issue when using different validator to compare with not existing field
  • #550, #551: Cannot validate against both ipv4 and ipv6 at the same time, thanks to @beeglebug
  • #588: Don't use min, max attributes (greaterThan, lessThan validators) for <input type="date" />
  • #665: The submitButtons option doesn't work correctly
  • #672: The zipCode validator throw an exception when passing not supported country code
  • #681: Fix the date validator issue where one of date/month/year or hours/minutes/seconds is prefixed by zero
  • #692: The remote validator can't set the type option via HTML attribute
  • #700: The between, greaterThan, lessThan validators accept param which isn't number

Language Packages

v0.5.0 (2014-07-14)

New Features

  • #2, #387: Provide the default error messages
  • #93, #385: Support translating error messages. Provide the Vietnamese language file
  • #121: Add events for form validate successfully or not
  • #125: Support dynamic fields
  • #130: Add addField() and removeField() methods for managing dynamic fields, thanks to @jcnmulio
  • #164: Add container option for indicating the element showing all errors
  • #175: Showing errors in tooltip or popover
  • #195: Add events for field validation
  • #211, #235: Add new method getInvalidFields() that returns all invalid fields
  • #275: Add destroy() method
  • #282, #347: Use error message that is returned from callback, remote validators
  • Add status.field.bv event which is triggered after updating the field status. It can be used to solve #300, #301
  • #316: Add isValidContainer(container) method
  • #320: Add separator option to the date validator
  • #323: Add isValidField(field) method
  • #324: Add success.validator.bv and error.validator.bv events triggered after a validator completes
  • #332: Add UK phone number support for the phone validator, thanks to @aca02djr
  • #336: Add $field instance to the callback validator
  • #356: Add group option
  • #374: Add Singapore postal code to the zipCode validator, thanks to @thisisclement
  • #406: Add revalidateField(field) method
  • #433: Add resetField(field, resetValue) method
  • #434: Add updateMessage(field, validator, message) method

Changes

  • #42: Remove the submit button from submitHandler(). You can use new getSubmitButton() method to get the clicked submit button
  • #109: Remove the setLiveMode() method
  • FormValidator.Helper renames mod_11_10 to mod11And10, mod_37_36 to mod37And36
  • Remove submitHandler() option. Use success.form.bv event instead:

v0.4.5 and earlier versions

$(form).bootstrapValidator({
    submitHandler: function(form, validator, submitButton) {
        ...
    }
});

v0.5.0 Using success.form.bv event:

$(form)
    .bootstrapValidator(options)
    .on('success.form.bv', function(e) {
        // Prevent form submission
        e.preventDefault();

        var $form        = $(e.target),
            validator    = $form.data('bootstrapValidator'),
            submitButton = validator.getSubmitButton();

        // Do whatever you want here ...
    });

Improvements

  • #244: Only enable the submit buttons if all fields are valid, thanks to @smeagol74
  • #262: Improve the updateStatus() method. The plugin now doesn't show the errors, feedback icons of given field if there are uncompleted validators
  • #274: Fix feedback icons in input-group, thanks to @tiagofontella
  • #287, #291: Only send the submit button which is clicked. It's an enhancement for #238
  • #297: Disable feedback icons for particular fields
  • #348: The uri validator now provides an option to support private/local network address
  • #364: Clicking the feedback icon also effect to the checkbox, radio fields
  • #366: Don't change the enable setting when the new one is the same
  • #371: Add H character to the Canadian postcode, thanks to @jzhang6
  • #382: Add JSHint to Grunt build
  • #388: Allow to override the default options. Useful for using multiple forms in the same page
  • #393: The remote validator adds support for dynamic url and method type (GET/POST), thanks to @ericnakagawa
  • #416, #448: Add updateOption() method for updating the particular validator option, thanks to @AlaskanShade
  • #420: Enable/disable particular validator
  • #422: Exclude particular field by excluded option or data-bv-excluded attribute
  • #426: Add test suite
  • #430: between, greaterThan, lessThan add support for comparing to other field, return value of a callback function
  • #431: Add built time to the build file
  • #432: Define the callback via data-bv-callback-callback attribute
  • #447: zipCode validator allow to set the country code via another field or callback, thanks to @AlaskanShade
  • #451: Validation of numeric fields with decimal steps, thanks to @Azuka
  • #456: Adjust the feedback icon position for .input-group element
  • #465: Support dynamic message

Bug Fixes

Document

Language Packages

v0.4.5 (2014-05-15)

v0.4.4 (2014-05-05)

v0.4.3 (2014-04-26)

v0.4.2 (2014-04-19)

v0.4.1 (2014-04-12)

  • #144, #158: Fixed an issue that the custom submit handler is not fired from the second time
  • #106: Prevent the validate() method from submit the form automatically. So we can call validate() to validate the form
  • #131: Doesn't trigger validation on the first focus
  • #145: The row state is now only marked as success if all fields on it are valid
  • #157: Added support for element outside of form using the selector option
  • #159, #163: User doesn't need to submit the form twice when remote validator complete, thanks to @jswale
  • #162: Fix errors in IE 8, thanks to @adgrafik
  • #166, #167: The phone validator now also checks the length of US phone number, thanks to @gercheq

v0.4.0 (2014-04-03)

Form attributes:

<form
    data-bv-message="This value is not valid"
    data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
    data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
    data-bv-feedbackicons-validating="glyphicon glyphicon-refresh"
    >

Field attributes:

<input type="text" class="form-control" name="username"
    data-bv-message="The username is not valid"
    data-bv-notempty data-bv-notempty-message="The username is required and cannot be empty"
    data-bv-stringlength="true" data-bv-stringlength-min="6" data-bv-stringlength-max="30" data-bv-stringlength-message="The username must be more than 6 and less than 30 characters long"
    data-bv-different="true" data-bv-different-field="password" data-bv-different-message="The username and password cannot be the same as each other"
    data-bv-remote="true" data-bv-remote-url="remote.php" data-bv-remote-message="The username is not available"
    />
HTML 5 attribute Validator
min="..." greaterThan validator
max="..." lessThan validator
maxlength="..." stringLength validator
pattern="..." regexp validator
required notEmpty validator
type="color" hexColor validator
type="email" emailAddress validator
type="range" between validator
type="url" uri validator

It's possible to use data-bv-trigger attribute:

<form data-bv-trigger="keyup">
    <input type="text" class="form-control" name="firstName" placeholder="First name"
           data-bv-trigger="keyup" />
    ...
    <input type="text" class="form-control" name="lastName" placeholder="First name"
           data-bv-trigger="blur" />
</form>

or trigger option:

$(form).bootstrapValidator({
    trigger: 'blur',            // Set for all fields
    fields: {
        firstName: {
            trigger: 'keyup',   // Custom for each field. Can be 'event1 event2 event3'
            validators: {
                ...
            }
        },
        lastName: {
            trigger: 'blur',
            validators: {
                ...
            }
        }
    }
});
<div class="form-group">
    <input class="form-control" type="text" name="surveyAnswer[]" />
</div>
<div class="form-group">
    <input class="form-control" type="text" name="surveyAnswer[]" />
</div>
<div class="form-group">
    <input class="form-control" type="text" name="surveyAnswer[]" />
</div>

v0.3.3 (2014-03-27)

v0.3.2 (2014-03-21)

v0.3.1 (2014-03-17)

v0.3.0 (2014-03-10)

v0.2.2 (2014-01-07)

  • #15: Focus to the first invalid element
  • #31: remote validator: Allow to set additional data to remote URL
  • #32, #43, #47: Only validate not empty field
  • #39: Validate existing fields only
  • #34: Avoid from calling form submit recursively
  • #40: Fix the issue when the form label doesn't have class

v0.2.1 (2013-11-08)

  • #29: Upgrade Bootstrap to v3.0.2
  • #30: Hide the error block containers before validating

v0.2.0 (2013-10-21)

v0.1.1 (2013-10-17)

  • Added submitButtons option
  • #16: Added disabling client side validation in HTML 5
  • #17: Added support for default Bootstrap form without labels
  • #19: Added support for select box validator

v0.1.0 (2013-10-14)