Skip to content

Latest commit

 

History

History
227 lines (189 loc) · 19.7 KB

CHANGELOG.md

File metadata and controls

227 lines (189 loc) · 19.7 KB

Change Log

v0.4.2 (not released yet)

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)