FormValidation v0.8.1 is released, supports Bootstrap 4 alpha 3

FormValidation v0.7.0 Released

News

New features

Allow to use multiple instance of validators via new alias option.

You can registry a new validator which is actually a built-in validator as following:

$(form).formValidation({
    framework: '...',
    fields: {
        username: {
            validators: {
                required: {
                    alias: 'notEmpty',
                    message: 'The username is required'
                }
            }
        }
    }
});

or use multiple instance of same validators (for example, callback, as following piece of code):

$(form).formValidation({
    framework: '...',
    fields: {
        password: {
            validators: {
                checkUppercase: {
                    alias: 'callback',
                    message: 'The password must have at least one uppercase character',
                    callback: function(value, validator, $field) {
                        ...
                    }
                },
                checkLowercase: {
                    alias: 'callback',
                    message: 'The password must have at least one lowercase character',
                    callback: function(value, validator, $field) {
                        ...
                    }
                },
                checkDigits: {
                    alias: 'callback',
                    message: 'The password must have at least one digit',
                    callback: function(value, validator, $field) {
                        ...
                    }
                },
                checkSpecial: {
                    alias: 'callback',
                    message: 'The password must have at least one special character',
                    callback: function(value, validator, $field) {
                        ...
                    }
                }
            }
        }
    }
});

Changes

Old New
be_FR fr_BE
be_NL nl_BE
gr_EL el_GR

Improvements

  • #151: integer validator accepts leading zeros
  • #163: between, greaterThan, lessThan validators now show the message where %s are replaced with the min, max, value options when the input isn't a number
  • #165: integer and numeric validators support more locales by providing new thousands and decimal separator options
  • #233: When using tooltip for multiple fields, it always shows on the last field
  • #234: Adjust the default messages when using the stringLength validator
  • The Spanish id, vat validators add type to the return value. The type can be DNI, NIE or CIF.

Bug fixes

  • #102, #166: Fix an issue on IE 10/11 that causes an input element with placeholder attribute to be validated automatically when it's focused
  • #177: Fix the bug that the isValidContainer() method doesn't ignore field which validators are totally disabled
  • #217: The field's enabled option doesn't work in declarative mode
  • #231: Fix the bug causing the message option for form isn't used. The plugin uses default message provided by each validator instead

Document

Download