diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..1a01981 --- /dev/null +++ b/.npmignore @@ -0,0 +1,10 @@ +#Testing, not relevant to end user +test/ +.travis.yml +.jshintrc + +#Not relevant to npm users +bower.json + +#IDE +.idea/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..9bf327d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "4.2.4" +before_script: + - npm install -g grunt-cli diff --git a/Gruntfile.js b/Gruntfile.js index 6be70ec..1eef85c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,136 +1,208 @@ +//TODO: During next major version bump change to /dist. Leaving at ./form-validator for backwards +//compatibility +const DIST_DIR = './form-validator'; +const MAIN_PLUGIN_FILE = 'jquery.form-validator'; +const SRC_DIR = './src'; +const MAIN_DIR = '/main/'; +const MODULE_DIR = '/modules'; +const LANG_DIR = '/lang'; +const CSS_FILE = 'theme-default.css'; +const CORE_VALIDATORS = 'core-validators.js'; //must come at end of concatted file +const coreValidatorsPath = SRC_DIR + MAIN_DIR + CORE_VALIDATORS; + var fs = require('fs'), - filesToBuild = { - uglify : {}, - concat : {}, - devFiles : [] + readFile = function (file) { + return fs.readFileSync(file, 'utf-8'); + }, + replaceInFile = function (path, from, to) { + fs.writeFileSync(path, readFile(path).replace(from, to)); + }; + +function initializeGruntConfig(grunt) { + + grunt.initConfig({ + + // Import package manifest + pkg: grunt.file.readJSON("package.json"), + + // Banner definitions + meta: { + banner: "/** File generated by Grunt -- do not modify\n" + + " * <%= (pkg.title || pkg.name).toUpperCase() %>\n" + + " *\n" + + " * @version <%= pkg.version %>\n" + + " * @website <%= pkg.homepage %>\n" + + " * @author <%= pkg.author.name %>, <%= pkg.author.url %>\n" + + " * @license <%= pkg.license %>\n" + + " */\n" }, - readFile = function(file) { - return fs.readFileSync(file, 'utf-8'); + + concat: { + main:{ + files: [ + //This concatenates the core validators file after the other files + //Per: http://gruntjs.com/configuring-tasks + { + src: [SRC_DIR + MAIN_DIR+'*.js', '!' + coreValidatorsPath, coreValidatorsPath], + dest: DIST_DIR + '/' + MAIN_PLUGIN_FILE + '.js' + }, + { + src: [SRC_DIR + MAIN_DIR+'*.js', '!' + coreValidatorsPath, coreValidatorsPath], + dest: DIST_DIR + '/' + MAIN_PLUGIN_FILE + '.min.js' + }] + }, + options: { + banner: "<%= meta.banner %>" + } }, - replaceInFile = function(path, from, to) { - fs.writeFileSync(path, readFile(path).replace(from, to)); - }; - -module.exports = function(grunt) { - - // Gather up all js files - ['form-validator/', 'form-validator/lang/'].forEach(function(path) { - fs.readdirSync(path).forEach(function(fileName) { - if(fileName.substr(-7) == '.dev.js') { - var name = fileName.substr(0, fileName.length - 7); - filesToBuild.uglify[path + name + '.js'] = [path + name + '.js']; - filesToBuild.concat['file'+name] = { - src : [path + fileName], - dest: path + name + '.js' - } - filesToBuild.devFiles.push( path + fileName ); + + cssmin: { + target: { + files: [ + { + dest: DIST_DIR, + src: CSS_FILE, + cwd: SRC_DIR, + expand: true, + ext: '.min.css' + } + ] } - }); - }); + }, + // Lint definitions + jshint: { + files: [SRC_DIR + '/*'], + options: { + jshintrc: ".jshintrc", + ignores: [SRC_DIR + '/' + CSS_FILE] + } + }, + + // Minify definitions + uglify: { + options: { + banner: "<%= meta.banner %>" + }, + main: { + files: [ + { + expand: true, + cwd: DIST_DIR + '/', + src: ['**/*.js', '!' + MAIN_PLUGIN_FILE +'.js'], + dest: DIST_DIR + '/' + } + ] + } + }, - // Add options for concat ang ugligy - filesToBuild.concat.options = { - banner: "<%= meta.banner %>" - }; - filesToBuild.uglify.options = { - banner: "<%= meta.banner %>" - }; - - // Add main script to concat/uglify - filesToBuild.uglify['form-validator/jquery.form-validator.min.js'] = 'form-validator/jquery.form-validator.min.js'; - filesToBuild.concat.main = { - src : ['form-validator/jquery.form-validator.js'], - dest : 'form-validator/jquery.form-validator.min.js' - } - - grunt.initConfig({ - - // Import package manifest - pkg: grunt.file.readJSON("package.json"), - - // Banner definitions - meta: { - banner: "/**\n" + - " * <%= (pkg.title || pkg.name).toUpperCase() %>\n" + - " *\n" + - " * @website by <%= pkg.author.homepage %>\n" + - " * @license <%= pkg.license %>\n" + - " * @version <%= pkg.version %>\n" + - " */\n" - }, - - // Concat definitions. The only purpose of this - // is to create a distribution file out - // of files name *.dev.js - concat: filesToBuild.concat, - - // Lint definitions - jshint: { - files: ["form-validator/*.dev.js", "form-validator/jquery.form-validator.js"], - options: { - jshintrc: ".jshintrc" - } - }, - - // Minify definitions - uglify: filesToBuild.uglify, - - // watch for changes to source - // Better than calling grunt a million times - // (call 'grunt watch') - watch: { - files: ['form-validator/*'], - tasks: ['default'] - }, + watch: { + files: [SRC_DIR + '/**'], + tasks: ['test'], + options: { + nospawn: true, + livereload: true + } + }, + // Unit tests qunit: { all: ['test/qunit.html'] - } + }, - }); + // Standalone servers + connect: { + server: { + options: { + port: 8000, + base: '.' + } + } + }, + + copy: { + main: { + files: [ + { + src: SRC_DIR + '/' + CSS_FILE, + dest: DIST_DIR + '/' + CSS_FILE + }, + { + cwd: SRC_DIR + '/' + MODULE_DIR, + src: '**', + dest: DIST_DIR + '/', + expand: true + }, + { + cwd: SRC_DIR + '/' + LANG_DIR, + src: '**', + dest: DIST_DIR + LANG_DIR +'/', + expand: true + }] + } + }, + + clean: [DIST_DIR + '/'], + + umd: { + main: { + options: { + src: DIST_DIR + '/**/*.js', + dest: './', + deps: { + default: ['jQuery'], + amd: [{'jquery': 'jQuery'}], + cjs: [{'jquery': 'jQuery'}] + } + } + } + } + }); +} +module.exports = function (grunt) { + initializeGruntConfig(grunt); /* - * Change to new version or the next version number in all files - * containing the version definition + * Change to new version or the next version number. The project must be built again after this task + * in order for the version change to take effect. */ - grunt.registerTask('version', 'Bump up the version number, or change version name by adding --new-version=3.1.0', function() { + grunt.registerTask('version', 'Bump up the version number, or change version name by adding --new-version=3.1.0', function () { var pkg = grunt.config.get('pkg'), - currentVersion = pkg.version, - newVersion = grunt.option('new-version'); - - - if( !newVersion ) { - var versionParts = currentVersion.split('.'), - newSubVersion = parseInt(versionParts.splice(versionParts.length-1, 1)[0]) + 1; - newSubVersion = newSubVersion < 10 && newSubVersion > 0 ? '0'+newSubVersion : newSubVersion.toString(); - newVersion = versionParts.join('.') + '.' + newSubVersion; + currentVersion = pkg.version, + newVersion = grunt.option('new-version'); + + if (!newVersion) { + var versionParts = currentVersion.split('.'), + newSubVersion = parseInt(versionParts.splice(versionParts.length - 1, 1)[0]) + 1; + newSubVersion = newSubVersion < 10 && newSubVersion > 0 ? '0' + newSubVersion : newSubVersion.toString(); + newVersion = versionParts.join('.') + '.' + newSubVersion; } - grunt.log.writeln('* Moving from version '+currentVersion+' to '+newVersion); + grunt.log.writeln('* Moving from version ' + currentVersion + ' to ' + newVersion); - // replace version in config files and dev-files - replaceInFile('form-validator/jquery.form-validator.min.js', '@version '+currentVersion, '@version '+newVersion); - replaceInFile('form-validator/jquery.form-validator.js', '@version '+currentVersion, '@version '+newVersion); - replaceInFile('package.json', '"version": "'+currentVersion+'"', '"version": "'+newVersion+'"'); - replaceInFile('formvalidator.jquery.json', '"version": "'+currentVersion+'"', '"version": "'+newVersion+'"'); - filesToBuild.devFiles.forEach(function(filePath) { - replaceInFile(filePath, '@version '+currentVersion, '@version '+newVersion); - }); + replaceInFile('package.json', '"version": "' + currentVersion + '"', + '"version": "' + newVersion + '"'); + replaceInFile('formvalidator.jquery.json', '"version": "' + currentVersion + '"', '"version": "' + newVersion + '"'); // Set new version globally (can later on be used by concat/uglify) pkg.version = newVersion; grunt.config.set('pkg', pkg); }); - - grunt.loadNpmTasks("grunt-contrib-concat"); - grunt.loadNpmTasks("grunt-contrib-jshint"); - grunt.loadNpmTasks("grunt-contrib-uglify"); - grunt.loadNpmTasks("grunt-contrib-watch"); + grunt.loadNpmTasks('grunt-contrib-clean'); + grunt.loadNpmTasks("grunt-contrib-concat"); + grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks("grunt-contrib-jshint"); + grunt.loadNpmTasks("grunt-contrib-uglify"); + grunt.loadNpmTasks("grunt-contrib-watch"); + grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-qunit'); - - grunt.registerTask("build", ["qunit", "version", "concat", "uglify"]); - grunt.registerTask("default", ["jshint", "build"]); - + grunt.loadNpmTasks('grunt-contrib-cssmin'); + grunt.loadNpmTasks('grunt-umd'); + + grunt.registerTask("build-production", ["version", "test", "uglify"]); + grunt.registerTask('build', ['concat', 'copy', 'umd', 'cssmin']); + grunt.registerTask('test', ['build','jshint', 'qunit']); + grunt.registerTask("default", ["test", "connect", "watch"]); + grunt.registerTask("prepublish", ["test", "uglify"]); }; diff --git a/README.md b/README.md index 271b14a..e1e957b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,14 @@ -# jQuery Form Validator +# jQuery Form Validator [DISCONTINUED] -jQuery Form Validator is a **feature rich and multilingual** jQuery plugin that makes it easy to validate user input while keeping your HTML markup clean from javascript code. Even though this plugin has a wide range of validation functions it's **designed to require as little jQuery network traffic as possible**. This is achieved by grouping together validation functions in "modules", making it possible to load only those functions that's needed to validate a particular form. +*Validation framework that let's you configure, rather than code, your validation logic.* -**Form demos and full documentation available at http://formvalidator.net/** +I started writing this plugin back in 2009 and it has given me much joy over the years. But all good things must come to an end and now it's time for this plugin to pull in its oars and go down with history. + +**This plugin is no longer being developed!** It supports jQuery v. 1.8 >= 2.2.4. No pull requests will become merged in but feel free to fork and do whatever you like! + +[![Travis](https://travis-ci.org/victorjonsson/jQuery-Form-Validator.svg)](https://travis-ci.org/victorjonsson/jQuery-Form-Validator/builds/) + +[![npm version](https://badge.fury.io/js/jquery-form-validator.svg)](https://www.npmjs.com/package/jquery-form-validator) *Usage example* @@ -27,7 +33,6 @@ jQuery Form Validator is a **feature rich and multilingual** jQuery plugin that - - - -... +```js +$.formUtils.loadModules('customModule otherCustomModule', 'js/validation-modules/'); +$.validate({ + modules: 'security, date' +}); ``` -The first argument of $.formUtils.loadModules is a comma separated string with names of module files, without -file extension (add .dev if the file name is for example mymodule.dev.js, this will insure that the browser never -caches the javascript). +The first argument of `$.formUtils.loadModules` is a comma separated string with names of module files, without +file extension. -The second argument is the path where the module files is located. This argument is optional, if not given +The second argument is the path where the module files are located. This argument is optional, if not given the module files has to be located in the same directory as the core modules shipped together with this jquery plugin (js/form-validator/) @@ -236,23 +265,722 @@ You can cause an element to be validated upon the firing of an event, by attachi ## Localization -This plugin comes with translations for English, German, French Spanish and Swedish. You can also choose to override the error +This plugin comes with translations for English, Polish, + Romanian, + Danish, + Norwegian, + Dutch, + Czech, + Catalan, + Russian, + Italian, + French, + German, + Swedish and + Portuguese. You can also choose to override the error dialogs yourself. Here you can read more about [localization](http://formvalidator.net/#localization) -## Program Flow -Form submit() event is bound to jQ func **validateForm()** when the form is submitted, it calls -jQ func **$.formUtils.validateInput**, which calls **validatorFunction** for the specific validation -rule assigned to the input element. If a validation fails, error messages are assigned and displayed -as configured. If **validateOnBlur** is set to true, jQ finds all form input elements with the -data-validation attribute and binds their onBlur event to call the function **validateInputOnBlur**. -it calls jQ func **$.formUtils.validateInput** to validate the single input when blurred. +# Default validators + +### Answer length (required) + +``` + + + + + + + + + + + + + + + + +``` +This plugin also supports the attributes "required" and "maxlength" by using the Html5 module. + +### Numbers +``` + + + + + + + + + + + + + + + + + + + + +You can also define the decimal separator when initializing the validation. + +

+ Average points
+ +

+ .... + + +``` +Inputs of type "number" will also become validated by loading the html5 module. + +### E-mail +``` + +``` +Inputs of type "email" will also become validated by loading the html5 module. + +### URL:s + +``` + +``` +Inputs of type "url" will also become validated by loading the html5 module. + +### Date + +``` + + + + + + + + +``` + +See the date module for further validators. + +### Alphanumeric + +``` + + + + + +``` +If you want to allow any kind of letters (not only A-Z) you're looking for the letternumeric validator. + +### Checkboxes Group +Validate qty of checkboxes in a group (same name) have been checked, using min, max or range. Only the first checkbox element in the group needs to have the validation attributes added. +``` + + + + + + +If your checkboxes group is generated by a server-side script and you don't want to add the validation attributes to each input element, you can use this javascript snippet before calling the validatorLoad() function + + + +Regexp + + +``` + +This plugin also supports the attribute "pattern" by using the Html5 module. + +### Character count down +``` +

+ History (50 characters left) + +

+ +``` +### Make validation optional +``` + + +``` +You can also use the logic module if you want the validation of an input depend on another input having a value. + +### Display help text +It is possible to display help information beside each input. The text will fade in when the input gets focus on and fade out when the input looses focus. The container for the help text will have the class form-help. If you don't want this feature you can read the setup guide on how to disable it. + +``` +
+

+ Why not? + +

+ ... +
+ ``` +### Validate inputs when blurred + +By default each input will become validated immediately when the input looses focus. If you don't want this feature you can read the setup guide on how to disable it. + +### Input suggestions +There are two ways you can give suggestions to the user while the user types. + +1) Using attribute data-suggestions + +``` +

+ What's your favorite color? + +

+ ... + +``` +2) Using $.formUtils.suggest() +``` + +``` +This plugin also supports the data-list element by using the Html5 module. + +Ignoring characters +You can tell any validator to ignore certain characters by using the attribute data-validation-ignore (comma separated list). +``` +

+ How much do you want to donate? + + +

+``` + +## Security validators< + +### Password confirmation + +This validator can be used to validate that the values of two inputs are the same. The first input should have a name suffixed with _confirmation and the second should have the same name but without the suffix. + +``` +

+ Password (at least 8 characters) + + + Confirm password + +

+``` + +``` +

+ E-mail + + + Repeat e-mail + +

+``` + +### Password strength + +Use this validator to make sure that your user has a strong enough password. Set attribute data-validation-strength to 1, 2 or 3 depending on how strong password you require. + +If you want the strength of the password to be displayed while the user types you call displayPasswordStrength() in the end of the form. + +``` +
+

+ Password: + +

+ ... +
+ + + + +``` + +### Server side validation + +By using this validator you can validate the value given by the user on the server before the form gets submitted. The validation function will send a POST request to the URL declared in data-validation-url. The argument posted to the URL will have the same name as the input being validated. + +The form will get the class validating-server-side while the server is being requested. + +The response from the validation script must be a JSON formatted object, containing the properties "valid" and "message". + +``` +{ + "valid" : true|false, + "message" : "String with text that should be displayed as error message" +} +``` + +#### Form + +``` +
+

+ User name: + +

+ ... +
+``` + +#### /validate-input.php + +``` + false, + 'message' => 'Post argument "user" is missing.' +); + +if( isset($_POST['user']) ) { + $userRepo = new UserRepository( DataStorage::instance() ); + $user = $userRepo->loadUser( $_POST['user'] ); + + if( $user ) { + // User name is registered on another account + $response = array('valid' => false, 'message' => 'This user name is already registered.'); + } else { + // User name is available + $response = array('valid' => true); + } +} +echo json_encode($response); +``` + +**Modifying the server request** + +The parameter containing the input value, sent to the server, will by default have the same name as the input. You can however set your own parameter name by using the attribute data-validation-param-name. You can also send along other parameters to the server by using the attribute data-validation-req-params. + +``` +$user->get('ID'))); +?> +

+ E-mail: + +

+``` + +### Credit card validation + +This validator makes it possible to validate any of the credit cards VISA, Mastercard, Diners club, Maestro, CJB, Discover and American express + +``` +<-- Accept credit card number from Visa, Mastercard and American Express --> +

+ Credit card number + +

+

+ Security code (cvv) + +

+``` + +You can also let the user choose a credit card and programmatically change the allowed credit card on the input of the card number. + +``` +

+ Credit card + +

+

+ Credit card number + +

+... + + +``` + +### Simple captcha + +``` + +
+

+ What is the sum of + ? + (security question) + +

+

+
+``` + +### Google reCAPTCHA + +Use this validator if wanting to integrate the Google service reCAPTCHA. + +``` +

+ +

+``` + +You can also use the setup function to configure the recaptcha service. + +``` +$.validate({ + reCaptchaSiteKey: '...', + reCaptchaTheme: 'light' +}); +``` + +### Letters and numbers + +By using the validator letternumeric you can validate that given input value only contains letters and/or numbers. This validator allows any type of character in contrast to the alphanumeric validator, which only allows letters A-Z. + +``` + + + + + +``` + +## Date validators + +### Birthdate + +This validator is the same as the default date validator except that it only allows past dates and dates that is not older than 120 years. + +``` + + + + + + + + +``` + +## Time + +``` + + +``` + + +## Location validators + +### Country + +``` + + +``` +### State (US) + +``` + + +``` + +### Longitude and Latitude + +``` + + +``` + +### Suggest country/state + +By using this function you'll make it easier for your visitor to input a country or state. + +``` +
+ ... +

+ Which country are you from? + +

+

+ Which state do you live in? + +

+
+ + + + +``` + +## File validators + +### File size + +This validation is only supported by Internet Explorer 10, Mozilla FireFox v >= 3.6 and any of the later versions of webkit based browsers. + +``` + + + + + +``` + +### File type + +This validation will fall back on checking the file extension in older browsers. In modern browsers the validation will check that any of the extensions in data-validation-allowing exists in the mime type declaration of the file. This means that data-validation-allowing="pdf" will work in both modern browsers (checking against "application/pdf") and older browsers (checking the file extension ".pdf"). + +``` + + + + + +``` + +Validating multiple files (with separate error messages depending on failed validation): + +``` + +``` + +### Image dimension and ratio + +Use the validator dimension to check the dimension of an image (jpg, gif or png). + +``` + + + + + + + + + + + + + + +``` + +Use the attribute data-validation-ratio to validate that the uploaded image has a certain ratio + +``` + + + + + +``` + +## Logic + +### Validators depending on each other + +Use the attributes data-validation-depends-on to configure that an input is optional as long as another input is left without an answer. + +``` + +

+ Contact me: + +

+

+ E-mail: + +

+``` + +``` + +

+ Country: + +

+ +

+ State: + +

+ +... + + + +``` + +### Require only one out of several inputs + +Use the attribute data-validation-optional-if-answered to tell the validator that only one, out of a group of inputs, requires an answer. + +``` +

+ Home phone number: + +

+

+ Cell phone number: + +

+

+ Work phone number: + +

+ +``` ## Changelog -#### 2.3.0 (unreleased) -- New translations (Polish, Romanian, Czech, Russian) +#### 2.3.19 +- New translations (Polish, Romanian, Danish, Norwegian, Dutch, Czech, Russian, Italian) - Several improvements made to already existing translations +- "Validation help" no longer puts constraints on input names +- Improved confirmation validation +- Config parameter `errorMessagePosition` is now only used to point out where error message should be placed. New configuration parameters is introduced that handles custom positioning of error messages [#226](https://github.com/victorjonsson/jQuery-Form-Validator/issues/226#issuecomment-191233456) +- Now possible to add `data-validation-ignore` to filter out certain characters before validation +- New sanitation method `strip` that removes defined characters +- Now possible to declare attributes not prefixed with data-validation in jsconf module +- All inputs gets sanitized on page load when using sanitation module +- Allow dates to omit leading zero using `data-validation-require-leading-zero="false"` +- Module toggleDisabled now acts on value change, not only mouse click +- `data-validation-if-checked` now deprecated, use `data-validation-depends-on` instead [#153](https://github.com/victorjonsson/jQuery-Form-Validator/issues/153) +- Event `beforeValidation` now gets value, language and configuration as arguments and can be used to prevent validation of the input. +- Security module now has a `recaptcha` validator that uses Google reCaptcha 2 +- The plugin is installable using npm (also possible to require validation modules when using browserify) +- Polish validation module +- Brazilian validation module +- UK validation module now also have validators `uknin` `ukutr` +- Sepa-module that makes it possible to validate sepa, iban and bic. +- New module named "logic" containing the features `data-validation-depends-on` and `data-validation-optional-if-answered` #### 2.2.8 - The plugin is now again possible to install via bower. @@ -317,22 +1045,22 @@ of validation that should be applied. * Correction of the US states in validation "federatestate" * Fixed bug in server validation -#### 2.1.9 +#### 2.1.09 * File validation now support multiple files * Length validation can now be used to validate the number of uploaded files using a file input that supports multiple files * Validation classes is no longer applied on inputs that for some reason shouldn't become validated -#### 2.1.8 +#### 2.1.08 * Now possible to configure the decimal separator when validating float values. Use either the attribute *data-validation-decimal-separator* or the property *decimalSeparator* when calling $.validate() * $.validationSetup is renamed to $.validate. You will still be able to initiate the validation by calling the $.validationSetup but it's considered deprecated. -#### 2.1.6 +#### 2.1.06 * Modules can now be loaded from remote websites -#### 2.1.5 +#### 2.1.05 * Fixed language bug (issue #43 on github) * Validation on server side is now triggered by the blur event * Now using class names that's compliant with twitter bootstrap 3.x @@ -357,29 +1085,4 @@ calling $.validate() ## Credits -#### Maintainer - -[Victor Jonsson](https://github.com/victorjonsson) - -#### Contributors -Steve Wasiura
-Thiago Lagden
-Joel Sutherland
-Matt Clements
-Josh Toft
-@dfcplc
-Andree Wendel
-Nicholas Huot
-@repkit
-Alexandar Blagotic
-Yasith Fernando
-@S0L4R1S
-Erick Lisangan
-@kirbs -hslee87 - -#### Additional credits - -Scott Gonzales (URL regexp)
-Darren Mason (Password strength meter)
-Steve Wasiura (Checkbox group) +http://www.formvalidator.net/#credits diff --git a/bower.json b/bower.json index 08ba0a1..3286f06 100644 --- a/bower.json +++ b/bower.json @@ -14,7 +14,7 @@ "dependencies": { "jquery": ">1.8.0" }, - "license": "Dual licensed under the MIT or GPL Version 2 licenses", + "license": "MIT", "ignore": [ "**/.*", "node_modules", diff --git a/form-validator/brazil.dev.js b/form-validator/brazil.dev.js deleted file mode 100644 index 472b2c6..0000000 --- a/form-validator/brazil.dev.js +++ /dev/null @@ -1,115 +0,0 @@ -/** - * jQuery Form Validator Module: Brazil - * ------------------------------------------ - * Created by Eduardo Cuducos - * - * This form validation module adds validators typically used on - * websites in the Brazil. This module adds the following validators: - * - cpf - * - cep - * - brphone - * - * @website http://formvalidator.net/#brazil-validators - * @license MIT - * @version 2.2.83 - */ - -$.formUtils.addValidator({ - name : 'cpf', - validatorFunction : function(string) { - - // Based on this post from DevMedia: - // http://www.devmedia.com.br/validar-cpf-com-javascript/23916 - - // clean up the input (digits only) and set some support vars - var cpf = string.replace(/\D/g,''); - var sum1 = 0; - var sum2 = 0; - var remainder1 = 0; - var remainder2 = 0; - - // skip special cases - if (cpf.length !== 11 || cpf === '00000000000') { - return false; - } - - // check 1st verification digit - for (i = 1; i<= 9; i++) { - sum1 += parseInt(cpf.substring(i - 1, i)) * (11 - i); - } - remainder1 = (sum1 * 10) % 11; - if (remainder1 >= 10) { - remainder1 = 0; - } - if (remainder1 !== parseInt(cpf.substring(9, 10))) { - return false; - } - - // check 2nd verification digit - for (i = 1; i <= 10; i++) { - sum2 += parseInt(cpf.substring(i - 1, i)) * (12 - i); - } - remainder2 = (sum2 * 10) % 11; - if (remainder2 >= 10) { - remainder2 = 0; - } - if (remainder2 !== parseInt(cpf.substring(10, 11))) { - return false; - } - - return true; - - }, - errorMessage : '', - errorMessageKey: 'badBrazilCPFAnswer' - -}); - -$.formUtils.addValidator({ - name : 'brphone', - validatorFunction : function(string) { - - // validates telefones such as (having X as numbers): - // (XX) XXXX-XXXX - // (XX) XXXXX-XXXX - // XX XXXXXXXX - // XX XXXXXXXXX - // XXXXXXXXXX - // XXXXXXXXXXX - // +XX XX XXXXX-XXXX - // +X XX XXXX-XXXX - // And so on… - - if (string.match(/^(\+[\d]{1,3}[\s]{0,1}){0,1}(\(){0,1}(\d){2}(\)){0,1}(\s){0,1}(\d){4,5}([-. ]){0,1}(\d){4}$/g)) { - return true; - } - - return false; - - }, - errorMessage : '', - errorMessageKey: 'badBrazilTelephoneAnswer' - -}); - -$.formUtils.addValidator({ - name : 'cep', - validatorFunction : function(string) { - - // validates CEP such as (having X as numbers): - // XXXXX-XXX - // XXXXX.XXX - // XXXXX XXX - // XXXXXXXX - - if (string.match(/^(\d){5}([-. ]){0,1}(\d){3}$/g)) { - return true; - } - - return false; - - }, - errorMessage : '', - errorMessageKey: 'badBrazilCEPAnswer' - -}); diff --git a/form-validator/brazil.js b/form-validator/brazil.js index 90042e8..12d9e1b 100644 --- a/form-validator/brazil.js +++ b/form-validator/brazil.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -$.formUtils.addValidator({name:"cpf",validatorFunction:function(a){var b=a.replace(/\D/g,""),c=0,d=0,e=0,f=0;if(11!==b.length||"00000000000"===b)return!1;for(i=1;i<=9;i++)c+=parseInt(b.substring(i-1,i))*(11-i);if(e=10*c%11,e>=10&&(e=0),e!==parseInt(b.substring(9,10)))return!1;for(i=1;i<=10;i++)d+=parseInt(b.substring(i-1,i))*(12-i);return f=10*d%11,f>=10&&(f=0),f!==parseInt(b.substring(10,11))?!1:!0},errorMessage:"",errorMessageKey:"badBrazilCPFAnswer"}),$.formUtils.addValidator({name:"brphone",validatorFunction:function(a){return a.match(/^(\+[\d]{1,3}[\s]{0,1}){0,1}(\(){0,1}(\d){2}(\)){0,1}(\s){0,1}(\d){4,5}([-. ]){0,1}(\d){4}$/g)?!0:!1},errorMessage:"",errorMessageKey:"badBrazilTelephoneAnswer"}),$.formUtils.addValidator({name:"cep",validatorFunction:function(a){return a.match(/^(\d){5}([-. ]){0,1}(\d){3}$/g)?!0:!1},errorMessage:"",errorMessageKey:"badBrazilCEPAnswer"}); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.formUtils.registerLoadedModule("brazil"),a.formUtils.addValidator({name:"cpf",validatorFunction:function(a){var b=a.replace(/\D/g,""),c=0,d=0,e=0,f=0;if(11!==b.length||"00000000000"===b)return!1;for(i=1;i<=9;i++)c+=parseInt(b.substring(i-1,i))*(11-i);if(e=10*c%11,e>=10&&(e=0),e!==parseInt(b.substring(9,10)))return!1;for(i=1;i<=10;i++)d+=parseInt(b.substring(i-1,i))*(12-i);return f=10*d%11,f>=10&&(f=0),f===parseInt(b.substring(10,11))},errorMessage:"",errorMessageKey:"badBrazilCPFAnswer"}),a.formUtils.addValidator({name:"brphone",validatorFunction:function(a){return!!a.match(/^(\+[\d]{1,3}[\s]{0,1}){0,1}(\(){0,1}(\d){2}(\)){0,1}(\s){0,1}(\d){4,5}([-. ]){0,1}(\d){4}$/g)},errorMessage:"",errorMessageKey:"badBrazilTelephoneAnswer"}),a.formUtils.addValidator({name:"cep",validatorFunction:function(a){return!!a.match(/^(\d){5}([-. ]){0,1}(\d){3}$/g)},errorMessage:"",errorMessageKey:"badBrazilCEPAnswer"})}(a)}); \ No newline at end of file diff --git a/form-validator/color.js b/form-validator/color.js new file mode 100644 index 0000000..b7f8a17 --- /dev/null +++ b/form-validator/color.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.formUtils.registerLoadedModule("color");var b=function(a){return/^(\-|\+)?([0-9]+(\.[0-9]+)?|Infinity)$/.test(a)?Number(a):NaN},c=function(a){return a>0&&a<1},d=function(b){return Math.floor(b)===b&&a.isNumeric(b)};a.formUtils.addValidator({name:"hex",validatorFunction:function(a,b){if("true"===b.valAttr("allow-transparent")&&"transparent"===a)return!0;var c="#"===a[0];if(!c)return!1;var d=4===a.length||7===a.length;if(d){var e=/[0-9a-f]/i,f=a.slice(1).split(""),g=!0;return f.forEach(function(a){null===a.match(e)&&(g=!1)}),g}return!1},errorMessage:"",errorMessageKey:"badHex"}),a.formUtils.addValidator({name:"rgb",validatorFunction:function(a,b){if("true"===b.valAttr("allow-transparent")&&"transparent"===a)return!0;var c=a.replace(/ /g,""),e=/rgb\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3}\)/i;if(c.match(e)){var f=c.replace(/rgb/g,""),g=f.replace(/\(/g,"").replace(/\)/g,""),h=g.split(","),i=!0;return h.forEach(function(a){var b=parseInt(a,10);(d(b)&&0<=b&&b<=255)===!1&&(i=!1)}),i}return!1},errorMessage:"",errorMessageKey:"badRgb"}),a.formUtils.addValidator({name:"rgba",validatorFunction:function(a,e){if("true"===e.valAttr("allow-transparent")&&"transparent"===a)return!0;var f=a.replace(/ /g,""),g=/rgba\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0,1]?.?[0-9]*\)/i;if(f.match(g)){var h=f.replace(/rgba/g,""),i=h.replace(/\(/g,"").replace(/\)/g,""),j=i.split(","),k=!0;return j.forEach(function(a,e){var f=b(a);if(d(f)){var g=f>=0&&f<=255;g||(k=!1),k&&3===e&&(k=f>=0&&f<2)}else c(a)||(k=!1)}),k}return!1},errorMessage:"",errorMessageKey:"badRgba"}),a.formUtils.addValidator({name:"hsl",validatorFunction:function(a,b){if("true"===b.valAttr("allow-transparent")&&"transparent"===a)return!0;var c=a.replace(/ /g,""),e=/hsl\(-?[0-9]{1,3},[0-9]{1,3}%,[0-9]{1,3}%\)/i;if(c.match(e)){var f=c.replace(/hsl/g,""),g=f.replace(/\(/g,"").replace(/\)/g,""),h=g.split(","),i=!0;return h.forEach(function(a,b){var c=parseInt(a,10);if(d(c)){if(0!==b){var e=c>=0&&c<=100;e||(i=!1)}}else i=!1}),i}return!1},errorMessage:"",errorMessageKey:"badHsl"}),a.formUtils.addValidator({name:"hsla",validatorFunction:function(a,c){if("true"===c.valAttr("allow-transparent")&&"transparent"===a)return!0;var e,f=a.replace(/ /g,""),g=/hsla\(-?[0-9]{1,3},[0-9]{1,3}%,[0-9]{1,3}%,[0,1]?.?[0-9]*\)/i;if(f.match(g)){var h=f.replace(/hsla/g,""),i=h.replace(/\(/g,"").replace(/\)/g,""),j=i.split(","),k=!0;return j.forEach(function(a,c){var f=b(a),g=parseInt(a,10);d(f)?(0!==c&&3!==c&&(e=f>=0&&f<=100,e||(k=!1)),k&&3===c&&(k=f>=0&&f<2)):isNaN(f)&&d(g)?(e=g>=0&&g<=100,e||(k=!1)):(f=b(Number(a).toFixed(20)),e=f>=0&&f<=1,e||(k=!1))}),k}return!1},errorMessage:"",errorMessageKey:"badHsla"})}(a)}); \ No newline at end of file diff --git a/form-validator/date.dev.js b/form-validator/date.dev.js deleted file mode 100644 index 6e9b0b5..0000000 --- a/form-validator/date.dev.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * jQuery Form Validator Module: Date - * ------------------------------------------ - * Created by Victor Jonsson - * Documentation and issue tracking on Github - * - * The following validators will be added by this module: - * - Time (HH:mmm) - * - Birth date - * - * @website http://formvalidator.net/#location-validators - * @license MIT - * @version 2.2.83 - */ -(function($) { - - /* - * Validate time hh:mm - */ - $.formUtils.addValidator({ - name : 'time', - validatorFunction : function(time) { - if (time.match(/^(\d{2}):(\d{2})$/) === null) { - return false; - } else { - var hours = parseInt(time.split(':')[0],10); - var minutes = parseInt(time.split(':')[1],10); - if( hours > 23 || minutes > 59 ) { - return false; - } - } - return true; - }, - errorMessage : '', - errorMessageKey: 'badTime' - }); - - /* - * Is this a valid birth date - */ - $.formUtils.addValidator({ - name : 'birthdate', - validatorFunction : function(val, $el, conf) { - var dateFormat = 'yyyy-mm-dd'; - if($el.valAttr('format')) { - dateFormat = $el.valAttr('format'); - } - else if(typeof conf.dateFormat !== 'undefined') { - dateFormat = conf.dateFormat; - } - - var inputDate = $.formUtils.parseDate(val, dateFormat); - if (!inputDate) { - return false; - } - - var d = new Date(); - var currentYear = d.getFullYear(); - var year = inputDate[0]; - var month = inputDate[1]; - var day = inputDate[2]; - - if (year === currentYear) { - var currentMonth = d.getMonth() + 1; - if (month === currentMonth) { - var currentDay = d.getDate(); - return day <= currentDay; - } - else { - return month < currentMonth; - } - } - else { - return year < currentYear && year > (currentYear - 124); // we can not live for ever yet... - } - }, - errorMessage : '', - errorMessageKey: 'badDate' - }); - -})(jQuery); diff --git a/form-validator/date.js b/form-validator/date.js index 313e860..ad744d3 100644 --- a/form-validator/date.js +++ b/form-validator/date.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a){a.formUtils.addValidator({name:"time",validatorFunction:function(a){if(null===a.match(/^(\d{2}):(\d{2})$/))return!1;var b=parseInt(a.split(":")[0],10),c=parseInt(a.split(":")[1],10);return b>23||c>59?!1:!0},errorMessage:"",errorMessageKey:"badTime"}),a.formUtils.addValidator({name:"birthdate",validatorFunction:function(b,c,d){var e="yyyy-mm-dd";c.valAttr("format")?e=c.valAttr("format"):"undefined"!=typeof d.dateFormat&&(e=d.dateFormat);var f=a.formUtils.parseDate(b,e);if(!f)return!1;var g=new Date,h=g.getFullYear(),i=f[0],j=f[1],k=f[2];if(i===h){var l=g.getMonth()+1;if(j===l){var m=g.getDate();return m>=k}return l>j}return h>i&&i>h-124},errorMessage:"",errorMessageKey:"badDate"})}(jQuery); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){function b(a,b,d){var e=new Date(a,b,d),f=new Date,g=f.getFullYear()-e.getFullYear();e.setFullYear(e.getFullYear()+g),e>f&&(g--,e.setFullYear(e.getFullYear()-1));var h=Math.floor((f.getTime()-e.getTime())/864e5),i=g+h/(c(f.getFullYear())?366:365),j=((i+"").split(".")[1]||"").substr(0,3);return i>=0?Math.floor(i)+(j>=915?1:0):(j*=10,Math.floor(i)+(j<=840?1:0))}function c(a){var b=new Date(a,1,28);return b.setDate(b.getDate()+1),1===b.getMonth()}a.formUtils.registerLoadedModule("date"),a.formUtils.addValidator({name:"time",validatorFunction:function(a){if(null===a.match(/^(\d{2}):(\d{2})$/))return!1;var b=parseInt(a.split(":")[0],10),c=parseInt(a.split(":")[1],10);return!(b>23||c>59)},errorMessage:"",errorMessageKey:"badTime"}),a.formUtils.addValidator({name:"birthdate",validatorFunction:function(c,d,e){var f="yyyy-mm-dd";d.valAttr("format")?f=d.valAttr("format"):"undefined"!=typeof e.dateFormat&&(f=e.dateFormat);var g=a.formUtils.parseDate(c,f);if(!g)return!1;var h=g[0],i=g[1],j=g[2],k=b(h,i,j),l=(d.valAttr("age-range")||"0-124").split("-");if(d.trigger("ageCalculated",[k]),2!==l.length||!a.isNumeric(l[0])||!a.isNumeric(l[1]))throw new Error("Date range format invalid");return k>=l[0]&&k<=l[1]},errorMessage:"",errorMessageKey:"badDate"})}(a)}); \ No newline at end of file diff --git a/form-validator/file.js b/form-validator/file.js index 2ae91d1..0e887a6 100644 --- a/form-validator/file.js +++ b/form-validator/file.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a,b){"use strict";var c="undefined"!=typeof b.FileReader,d=function(b){var c=a.split((b.valAttr("allowing")||"").toLowerCase());return a.inArray("jpg",c)>-1&&-1===a.inArray("jpeg",c)?c.push("jpeg"):a.inArray("jpeg",c)>-1&&-1===a.inArray("jpg",c)&&c.push("jpg"),c},e=function(a,b,c,d){var e=d[b]||"";a.errorMessageKey="",a.errorMessage=e.replace("%s",c)},f=function(a){b.console&&b.console.log&&b.console.log(a)},g=function(c,d,e){var f=new FileReader,g=new Image;f.readAsDataURL(c),f.onload=function(c){g.onload=function(){a(b).trigger("imageValidation",[this]),d(this)},g.onerror=function(){e()},g.src=c.target.result}};a.formUtils.addValidator({name:"mime",validatorFunction:function(b,g,h,i){if(c){var j=!0,k=g.get(0).files||[],l="",m=d(g);return k.length&&(a.each(k,function(b,c){return j=!1,l=c.type||"",a.each(m,function(a,b){return j=l.indexOf(b)>-1,j?!1:void 0}),j}),j||(f("Trying to upload a file with mime type "+l+" which is not allowed"),e(this,"wrongFileType",m.join(", "),i))),j}return f("FileReader not supported by browser, will check file extension"),a.formUtils.validators.validate_extension.validatorFunction(b,g,h,i)},errorMessage:"",errorMessageKey:"wrongFileType"}),a.formUtils.addValidator({name:"extension",validatorFunction:function(b,c,f,g){var h=!0,i=this,j=d(c);return a.each(c.get(0).files||[b],function(b,c){var d="string"==typeof c?c:c.value||c.fileName||c.name,f=d.substr(d.lastIndexOf(".")+1);return-1===a.inArray(f.toLowerCase(),j)?(h=!1,e(i,"wrongFileType",j.join(", "),g),!1):void 0}),h},errorMessage:"",errorMessageKey:"wrongFileType"}),a.formUtils.addValidator({name:"size",validatorFunction:function(b,d,g,h){var i=d.valAttr("max-size");if(!i)return f('Input "'+d.attr("name")+'" is missing data-validation-max-size attribute'),!0;if(!c)return!0;var j=a.formUtils.convertSizeNameToBytes(i),k=!0;return a.each(d.get(0).files||[],function(a,b){return k=b.size<=j}),k||e(this,"wrongFileSize",i,h),k},errorMessage:"",errorMessageKey:"wrongFileSize"}),a.formUtils.convertSizeNameToBytes=function(a){return a=a.toUpperCase(),"M"===a.substr(a.length-1,1)?1024*parseInt(a.substr(0,a.length-1),10)*1024:"MB"===a.substr(a.length-2,2)?1024*parseInt(a.substr(0,a.length-2),10)*1024:"KB"===a.substr(a.length-2,2)?1024*parseInt(a.substr(0,a.length-2),10):"B"===a.substr(a.length-1,1)?parseInt(a.substr(0,a.length-1),10):parseInt(a,10)};var h=function(){return!1};a.formUtils.checkImageDimension=function(a,b,c){var d=!1,e={width:0,height:0},f=function(a){a=a.replace("min","").replace("max","");var b=a.split("x");e.width=b[0],e.height=b[1]?b[1]:b[0]},g=!1,h=!1,i=b.split("-");return 1===i.length?0===i[0].indexOf("min")?g=i[0]:h=i[0]:(g=i[0],h=i[1]),g&&(f(g),(a.widthe.width||a.height>e.height)&&(d=a.width>e.width?c.imageTooWide+" "+e.width+"px":c.imageTooTall+" "+e.height+"px",d+=" ("+c.max+" "+e.width+"x"+e.height+"px)")),d},a.formUtils.checkImageRatio=function(a,b,c){var d=a.width/a.height,e=function(a){var b=a.replace("max","").replace("min","").split(":");return b[0]/b[1]},f=b.split("-"),g=function(a,b,c){return a>=b&&c>=a};if(1===f.length){if(d!==e(f[0]))return c.imageRatioNotAccepted}else if(2===f.length&&!g(d,e(f[0]),e(f[1])))return c.imageRatioNotAccepted;return!1},a.formUtils.addValidator({name:"dimension",validatorFunction:function(b,d,e,f,i){var j=!1;if(c){var k=d.get(0).files||[];if(j=!0,-1===d.attr("data-validation").indexOf("mime"))return alert("You should validate file type being jpg, gif or png on input "+d[0].name),!1;if(k.length>1)return alert("Validating image dimensions does not support inputs allowing multiple files"),!1;if(0===k.length)return!0;if(d.valAttr("has-valid-dim"))return!0;if(d.valAttr("has-not-valid-dim"))return this.errorMessage=f.wrongFileDim+" "+d.valAttr("has-not-valid-dim"),!1;if("keyup"===a.formUtils.eventType)return null;var l=!1;return a.formUtils.isValidatingEntireForm&&(l=!0,a.formUtils.haltValidation=!0,i.bind("submit",h).addClass("on-blur")),g(k[0],function(b){var c=!1;d.valAttr("dimension")&&(c=a.formUtils.checkImageDimension(b,d.valAttr("dimension"),f)),!c&&d.valAttr("ratio")&&(c=a.formUtils.checkImageRatio(b,d.valAttr("ratio"),f)),c?d.valAttr("has-not-valid-dim",c):d.valAttr("has-valid-dim","true"),d.valAttr("has-keyup-event")||d.valAttr("has-keyup-event","1").bind("keyup change",function(b){9!==b.keyCode&&16!==b.keyCode&&a(this).valAttr("has-not-valid-dim",!1).valAttr("has-valid-dim",!1)}),l?(a.formUtils.haltValidation=!1,i.removeClass("on-blur").get(0).onsubmit=function(){},i.unbind("submit",h),i.trigger("submit")):d.trigger("blur")},function(a){throw a}),!0}return j},errorMessage:"",errorMessageKey:""}),a(b).one("validatorsLoaded formValidationSetup",function(b,c){var d;d=c?c.find('input[type="file"]'):a('input[type="file"]'),d.filter("*[data-validation]").bind("change",function(){a(this).removeClass("error").parent().find(".form-error").remove()})})}(jQuery,window); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){a.formUtils.registerLoadedModule("file");var c="undefined"!=typeof b.FileReader,d=function(b){var c=(b.valAttr("allowing")||"").toLowerCase().split(/,\s*/);return a.inArray("jpg",c)>-1&&a.inArray("jpeg",c)===-1?c.push("jpeg"):a.inArray("jpeg",c)>-1&&a.inArray("jpg",c)===-1&&c.push("jpg"),c},e=function(a,b,c,d){var e=d[b]||"";a.errorMessageKey="",a.errorMessage=e.replace("%s",c)},f=function(c,d,e){var f=new FileReader,g=new Image;f.readAsDataURL(c),f.onload=function(c){g.onload=function(){a(b).trigger("imageValidation",[this]),d(this)},g.onerror=function(){e()},g.src=c.target.result}};a.formUtils.addValidator({name:"mime",validatorFunction:function(b,f,g,h){if(c){var i=!0,j=f.get(0).files||[],k="",l=d(f);return j.length&&(a.each(j,function(b,c){return i=!1,k=c.type||c.name.substring(c.name.lastIndexOf(".")+1),a.each(l,function(a,b){if(i=k.indexOf(b)>-1)return!1}),i}),i||(a.formUtils.warn("Trying to upload a file with mime type "+k+" which is not allowed"),e(this,"wrongFileType",l.join(", "),h))),i}return a.formUtils.warn("FileReader not supported by browser, will check file extension"),a.formUtils.validators.validate_extension.validatorFunction(b,f,g,h)},errorMessage:"",errorMessageKey:"wrongFileType"}),a.formUtils.addValidator({name:"extension",validatorFunction:function(b,c,f,g){var h=!0,i=this,j=d(c);return a.each(c.get(0).files||[b],function(b,c){var d="string"==typeof c?c:c.value||c.fileName||c.name,f=d.substr(d.lastIndexOf(".")+1);if(a.inArray(f.toLowerCase(),j)===-1)return h=!1,e(i,"wrongFileType",j.join(", "),g),!1}),h},errorMessage:"",errorMessageKey:"wrongFileType"}),a.formUtils.addValidator({name:"size",validatorFunction:function(b,d,f,g){var h=d.valAttr("max-size");if(!h)return a.formUtils.warn('Input "'+d.attr("name")+'" is missing data-validation-max-size attribute',!0),!0;if(!c)return!0;var i=a.formUtils.convertSizeNameToBytes(h),j=!0;return a.each(d.get(0).files||[],function(a,b){return j=b.size<=i}),j||e(this,"wrongFileSize",h,g),j},errorMessage:"",errorMessageKey:"wrongFileSize"}),a.formUtils.convertSizeNameToBytes=function(a){return a=a.toUpperCase(),"M"===a.substr(a.length-1,1)?1024*parseInt(a.substr(0,a.length-1),10)*1024:"MB"===a.substr(a.length-2,2)?1024*parseInt(a.substr(0,a.length-2),10)*1024:"KB"===a.substr(a.length-2,2)?1024*parseInt(a.substr(0,a.length-2),10):"B"===a.substr(a.length-1,1)?parseInt(a.substr(0,a.length-1),10):parseInt(a,10)},a.formUtils.checkImageDimension=function(a,b,c){var d=!1,e={width:0,height:0},f=function(a){a=a.replace("min","").replace("max","");var b=a.split("x");e.width=b[0],e.height=b[1]?b[1]:b[0]},g=!1,h=!1,i=b.split("-");return 1===i.length?0===i[0].indexOf("min")?g=i[0]:h=i[0]:(g=i[0],h=i[1]),g&&(f(g),(a.widthe.width||a.height>e.height)&&(d=a.width>e.width?c.imageTooWide+" "+e.width+"px":c.imageTooTall+" "+e.height+"px",d+=" ("+c.max+" "+e.width+"x"+e.height+"px)")),d},a.formUtils.checkImageRatio=function(a,b,c){var d=a.width/a.height,e=function(a){var b=a.replace("max","").replace("min","").split(":");return b[0]/b[1]},f=b.split("-"),g=function(a,b,c){return a>=b&&a<=c};if(1===f.length){if(d!==e(f[0]))return c.imageRatioNotAccepted}else if(2===f.length&&!g(d,e(f[0]),e(f[1])))return c.imageRatioNotAccepted;return!1},a.formUtils.addAsyncValidator({name:"dimension",validatorFunction:function(b,d,e,g,h){if(c){var i=e.get(0).files||[],j=this;e.attr("data-validation").indexOf("mime")===-1?(alert("You should validate file type being jpg, gif or png on input "+e[0].name),b(!1)):i.length>1?(alert("Validating image dimensions does not support inputs allowing multiple files"),b(!1)):0===i.length?b(!0):f(i[0],function(c){var d=!1;e.valAttr("dimension")&&(d=a.formUtils.checkImageDimension(c,e.valAttr("dimension"),h)),!d&&e.valAttr("ratio")&&(d=a.formUtils.checkImageRatio(c,e.valAttr("ratio"),h)),d?(j.errorMessage=h.wrongFileDim+" "+e.valAttr("has-not-valid-dim"),b(!1)):b(!0)},function(a){throw a})}else b(!0)},errorMessage:"",errorMessageKey:""}),a(b).one("validatorsLoaded formValidationSetup",function(b,c,d){var e;e=c?c.find('input[type="file"]'):a('input[type="file"]'),a.formUtils.dialogs.removeInputStylingAndMessage(e,d)})}(a,window)}); \ No newline at end of file diff --git a/form-validator/html5.dev.js b/form-validator/html5.dev.js deleted file mode 100644 index b355305..0000000 --- a/form-validator/html5.dev.js +++ /dev/null @@ -1,166 +0,0 @@ -/** - * jQuery Form Validator Module: html5 - * ------------------------------------------ - * Created by Victor Jonsson - * - * The following module will make this jQuery plugin serve as a - * html5 fallback. It makes older browsers support the following - * - validation when type="email" - * - validation when type="url" - * - validation when type="time" - * - validation when type="date" - * - validation when type="number" and max="" min="" - * - validation when pattern="REGEXP" - * - validation when using maxlength - * - Using datalist element for creating suggestions - * - placeholders - * - * @website http://formvalidator.net/ - * @license MIT - * @version 2.2.83 - */ -(function($, window) { - - 'use strict'; - - var SUPPORTS_PLACEHOLDER = 'placeholder' in document.createElement('INPUT'), - SUPPORTS_DATALIST = 'options' in document.createElement('DATALIST'), - hasLoadedDateModule = false, - setupValidationUsingHTML5Attr = function($form) { - - $form.each(function() { - var $f = $(this), - $formInputs = $f.find('input,textarea,select'), - foundHtml5Rule = false; - - $formInputs.each(function() { - var validation = [], - $input = $(this), - isRequired = $input.attr('required'), - attrs = {}; - - switch ( ($input.attr('type') || '').toLowerCase() ) { - case 'time': - validation.push('time'); - if( !$.formUtils.validators.validate_date && !hasLoadedDateModule ) { - hasLoadedDateModule = true; - $.formUtils.loadModules('date'); - } - break; - case 'url': - validation.push('url'); - break; - case 'email': - validation.push('email'); - break; - case 'date': - validation.push('date'); - break; - case 'number': - validation.push('number'); - var max = $input.attr('max'), - min = $input.attr('min'); - if( min || max ) { - if ( !min ) { - min = '0'; - } - if ( !max ) { - max = '9007199254740992'; // js max int - } - - attrs['data-validation-allowing'] = 'range['+min+';'+max+']'; - if( min.indexOf('-') === 0 || max.indexOf('-') === 0 ) { - attrs['data-validation-allowing'] += ',negative'; - } - if( min.indexOf('.') > -1 || max.indexOf('.') > -1 ) { - attrs['data-validation-allowing'] += ',float'; - } - } - break; - } - - if( $input.attr('pattern') ) { - validation.push('custom'); - attrs['data-validation-regexp'] = $input.attr('pattern'); - } - if( $input.attr('maxlength') ) { - validation.push('length'); - attrs['data-validation-length'] = 'max'+$input.attr('maxlength'); - } - - if( !SUPPORTS_DATALIST && $input.attr('list') ) { - var suggestions = [], - $list = $('#'+$input.attr('list')); - - $list.find('option').each(function() { - suggestions.push($(this).text()); - }); - - if( suggestions.length === 0 ) { - // IE fix - var opts = $.trim($('#'+$input.attr('list')).text()).split('\n'); - $.each(opts, function(i, option) { - suggestions.push($.trim(option)); - }); - } - - $list.remove(); - - $.formUtils.suggest( $input, suggestions ); - } - - if ( isRequired && validation.length === 0 ) { - validation.push('required'); - } - - if( validation.length ) { - if( !isRequired ) { - attrs['data-validation-optional'] = 'true'; - } - - foundHtml5Rule = true; - $input.attr('data-validation', validation.join(' ')); - - $.each(attrs, function(attrName, attrVal) { - $input.attr(attrName, attrVal); - }); - } - }); - - if( foundHtml5Rule ) { - $f.trigger('html5ValidationAttrsFound'); - } - - if( !SUPPORTS_PLACEHOLDER ) { - $formInputs.filter('input[placeholder]').each(function() { - this.defaultValue = this.getAttribute('placeholder'); - $(this) - .bind('focus', function() { - if(this.value === this.defaultValue) { - this.value = ''; - $(this).removeClass('showing-placeholder'); - } - }) - .bind('blur', function() { - if($.trim(this.value) === '') { - this.value = this.defaultValue; - $(this).addClass('showing-placeholder'); - } - }); - }); - } - - }); - }; - - $(window).bind('validatorsLoaded formValidationSetup', function(evt, $form) { - if( !$form ) { - $form = $('form'); - } - setupValidationUsingHTML5Attr($form); - }); - - // Make this method available outside the module - $.formUtils.setupValidationUsingHTML5Attr = setupValidationUsingHTML5Attr; - -})(jQuery, window); diff --git a/form-validator/html5.js b/form-validator/html5.js index 1105cda..498d3bc 100644 --- a/form-validator/html5.js +++ b/form-validator/html5.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a,b){"use strict";var c="placeholder"in document.createElement("INPUT"),d="options"in document.createElement("DATALIST"),e=!1,f=function(b){b.each(function(){var b=a(this),f=b.find("input,textarea,select"),g=!1;f.each(function(){var b=[],c=a(this),f=c.attr("required"),h={};switch((c.attr("type")||"").toLowerCase()){case"time":b.push("time"),a.formUtils.validators.validate_date||e||(e=!0,a.formUtils.loadModules("date"));break;case"url":b.push("url");break;case"email":b.push("email");break;case"date":b.push("date");break;case"number":b.push("number");var i=c.attr("max"),j=c.attr("min");(j||i)&&(j||(j="0"),i||(i="9007199254740992"),h["data-validation-allowing"]="range["+j+";"+i+"]",(0===j.indexOf("-")||0===i.indexOf("-"))&&(h["data-validation-allowing"]+=",negative"),(j.indexOf(".")>-1||i.indexOf(".")>-1)&&(h["data-validation-allowing"]+=",float"))}if(c.attr("pattern")&&(b.push("custom"),h["data-validation-regexp"]=c.attr("pattern")),c.attr("maxlength")&&(b.push("length"),h["data-validation-length"]="max"+c.attr("maxlength")),!d&&c.attr("list")){var k=[],l=a("#"+c.attr("list"));if(l.find("option").each(function(){k.push(a(this).text())}),0===k.length){var m=a.trim(a("#"+c.attr("list")).text()).split("\n");a.each(m,function(b,c){k.push(a.trim(c))})}l.remove(),a.formUtils.suggest(c,k)}f&&0===b.length&&b.push("required"),b.length&&(f||(h["data-validation-optional"]="true"),g=!0,c.attr("data-validation",b.join(" ")),a.each(h,function(a,b){c.attr(a,b)}))}),g&&b.trigger("html5ValidationAttrsFound"),c||f.filter("input[placeholder]").each(function(){this.defaultValue=this.getAttribute("placeholder"),a(this).bind("focus",function(){this.value===this.defaultValue&&(this.value="",a(this).removeClass("showing-placeholder"))}).bind("blur",function(){""===a.trim(this.value)&&(this.value=this.defaultValue,a(this).addClass("showing-placeholder"))})})})};a(b).bind("validatorsLoaded formValidationSetup",function(b,c){c||(c=a("form")),f(c)}),a.formUtils.setupValidationUsingHTML5Attr=f}(jQuery,window); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){"use strict";a.formUtils.registerLoadedModule("html5");var b="placeholder"in document.createElement("INPUT"),c="options"in document.createElement("DATALIST"),d=!1,e=function(e){e.each(function(){var e=a(this),f=e.find("input,textarea,select"),g=!1;f.each(function(){var b=[],e=a(this),f=e.attr("required"),h={};switch(f&&b.push("required"),(e.attr("type")||"").toLowerCase()){case"time":b.push("time"),a.formUtils.validators.validate_date||d||(d=!0,a.formUtils.loadModules("date"));break;case"url":b.push("url");break;case"email":b.push("email");break;case"date":b.push("date");break;case"number":b.push("number");var i=e.attr("max"),j=e.attr("min"),k=e.attr("step");j||i?(j||(j="0"),i||(i="9007199254740992"),k||(k="1"),h["data-validation-allowing"]="range["+j+";"+i+"]",0!==j.indexOf("-")&&0!==i.indexOf("-")||(h["data-validation-allowing"]+=",negative"),(j.indexOf(".")>-1||i.indexOf(".")>-1||k.indexOf(".")>-1)&&(h["data-validation-allowing"]+=",float")):h["data-validation-allowing"]+=",float,negative"}if(e.attr("pattern")&&(b.push("custom"),h["data-validation-regexp"]=e.attr("pattern")),e.attr("maxlength")&&(b.push("length"),h["data-validation-length"]="max"+e.attr("maxlength")),!c&&e.attr("list")){var l=[],m=a("#"+e.attr("list"));if(m.find("option").each(function(){l.push(a(this).text())}),0===l.length){var n=a.trim(a("#"+e.attr("list")).text()).split("\n");a.each(n,function(b,c){l.push(a.trim(c))})}m.remove(),a.formUtils.suggest(e,l)}if(b.length){f||(h["data-validation-optional"]="true"),g=!0;var o=(e.attr("data-validation")||"")+" "+b.join(" ");e.attr("data-validation",a.trim(o)),a.each(h,function(a,b){e.attr(a,b)})}}),g&&e.trigger("html5ValidationAttrsFound"),b||f.filter("input[placeholder]").each(function(){this.__defaultValue=this.getAttribute("placeholder"),a(this).bind("focus",function(){this.value===this.__defaultValue&&(this.value="",a(this).removeClass("showing-placeholder"))}).bind("blur",function(){""===a.trim(this.value)&&(this.value=this.__defaultValue,a(this).addClass("showing-placeholder"))})})})};a.formUtils.$win.bind("validatorsLoaded formValidationSetup",function(b,c){c||(c=a("form")),e(c)}),a.formUtils.setupValidationUsingHTML5Attr=e}(a,window)}); \ No newline at end of file diff --git a/form-validator/jquery.form-validator.js b/form-validator/jquery.form-validator.js index afaba79..b8dee25 100644 --- a/form-validator/jquery.form-validator.js +++ b/form-validator/jquery.form-validator.js @@ -1,120 +1,520 @@ -/** - * jQuery Form Validator - * ------------------------------------------ - * Created by Victor Jonsson +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module unless amdModuleId is set + define(["jquery"], function (a0) { + return (factory(a0)); + }); + } else if (typeof module === 'object' && module.exports) { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(require("jquery")); + } else { + factory(root["jQuery"]); + } +}(this, function (jQuery) { + +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR * - * @website http://formvalidator.net/ - * @license MIT - * @version 2.2.83 + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +/** + */ +(function ($, window, undefined) { + + var disableFormSubmit = function () { + return false; + }, + lastFormEvent = null, + HaltManager = { + numHalted: 0, + haltValidation: function($form) { + this.numHalted++; + $.formUtils.haltValidation = true; + $form + .unbind('submit', disableFormSubmit) + .bind('submit', disableFormSubmit) + .find('*[type="submit"]') + .addClass('disabled') + .attr('disabled', 'disabled'); + }, + unHaltValidation: function($form) { + this.numHalted--; + if (this.numHalted === 0) { + $.formUtils.haltValidation = false; + $form + .unbind('submit', disableFormSubmit) + .find('*[type="submit"]') + .removeClass('disabled') + .removeAttr('disabled', 'disabled'); + } + } + }; + + function AsyncValidation($form, $input) { + this.$form = $form; + this.$input = $input; + this.reset(); + $input.on('change paste', this.reset.bind(this)); + } + + AsyncValidation.prototype.reset = function() { + this.haltedFormValidation = false; + this.hasRun = false; + this.isRunning = false; + this.result = undefined; + }; + + AsyncValidation.prototype.run = function(eventContext, callback) { + if (eventContext === 'keyup') { + return null; + } else if (this.isRunning) { + lastFormEvent = eventContext; + if (!this.haltedFormValidation) { + HaltManager.haltValidation(); + this.haltedFormValidation = true; + } + return null; // Waiting for result + } else if(this.hasRun) { + //this.$input.one('keyup change paste', this.reset.bind(this)); + return this.result; + } else { + lastFormEvent = eventContext; + HaltManager.haltValidation(this.$form); + this.haltedFormValidation = true; + this.isRunning = true; + this.$input + .attr('disabled', 'disabled') + .addClass('async-validation'); + this.$form.addClass('async-validation'); + + callback(function(result) { + this.done(result); + }.bind(this)); + + return null; + } + }; + + AsyncValidation.prototype.done = function(result) { + this.result = result; + this.hasRun = true; + this.isRunning = false; + this.$input + .removeAttr('disabled') + .removeClass('async-validation'); + this.$form.removeClass('async-validation'); + if (this.haltedFormValidation) { + HaltManager.unHaltValidation(this.$form); + if (lastFormEvent === 'submit') { + this.$form.trigger('submit'); + } else { + this.$input.trigger('validation.revalidate'); + } + } + }; + + AsyncValidation.loadInstance = function(validatorName, $input, $form) { + // Return async validator attached to this input element + // or create a new async validator and attach it to the input + var asyncValidation, + input = $input.get(0); + + if (!input.asyncValidators) { + input.asyncValidators = {}; + } + + if (input.asyncValidators[validatorName]) { + asyncValidation = input.asyncValidators[validatorName]; + } else { + asyncValidation = new AsyncValidation($form, $input); + input.asyncValidators[validatorName] = asyncValidation; + } + + return asyncValidation; + }; + + $.formUtils = $.extend($.formUtils || {}, { + + /** + * @deprecated + * @param validatorName + * @param $input + * @param $form + */ + asyncValidation: function(validatorName, $input, $form) { + // @todo: Remove when moving up to version 3.0 + this.warn('Use of deprecated function $.formUtils.asyncValidation, use $.formUtils.addAsyncValidator() instead'); + return AsyncValidation.loadInstance(validatorName, $input, $form); + }, + + /** + * @param {Object} asyncValidator + */ + addAsyncValidator: function (asyncValidator) { + var validator = $.extend({}, asyncValidator), + originalValidatorFunc = validator.validatorFunction; + validator.async = true; + validator.validatorFunction = function (value, $el, config, language, $form, eventContext) { + var asyncValidation = AsyncValidation.loadInstance(this.name, $el, $form); + return asyncValidation.run(eventContext, function(done) { + originalValidatorFunc.apply(validator, [ + done, value, $el, config, language, $form, eventContext + ]); + }); + }; + this.addValidator(validator); + } + }); + + // Tag elements having async validators + $(window).bind('validatorsLoaded formValidationSetup', function (evt, $form) { + if (!$form) { + $form = $('form'); + } + $form.find('[data-validation]').each(function () { + var $input = $(this); + $input.valAttr('async', false); + $.each($.split($input.attr('data-validation')), function (i, validatorName) { + var validator = $.formUtils.validators['validate_'+validatorName]; + if (validator && validator.async) { + $input.valAttr('async', 'yes'); + } + }); + }); + }); + +})(jQuery, window); + +/** + * Deprecated functions and attributes + * @todo: Remove in release of 3.0 + */ +(function ($, undefined) { + + 'use strict'; + + /** + * @deprecated + * @param language + * @param conf + */ + $.fn.validateForm = function (language, conf) { + $.formUtils.warn('Use of deprecated function $.validateForm, use $.isValid instead'); + return this.isValid(language, conf, true); + }; + + $(window) + .on('formValidationPluginInit', function(evt, config) { + convertDeprecatedLangCodeToISO6391(config); + addSupportForCustomErrorMessageCallback(config); + addSupportForElementReferenceInPositionParam(config); + }) + .on('validatorsLoaded formValidationSetup', function(evt, $form) { + if( !$form ) { + $form = $('form'); + } + addSupportForValidationDependingOnCheckedInput($form); + }); + + + function addSupportForCustomErrorMessageCallback(config) { + if (config && + config.errorMessagePosition === 'custom' && + typeof config.errorMessageCustom === 'function') { + + $.formUtils.warn('Use of deprecated function errorMessageCustom, use config.submitErrorMessageCallback instead'); + + config.submitErrorMessageCallback = function($form, errorMessages) { + config.errorMessageCustom( + $form, + config.language.errorTitle, + errorMessages, + config + ); + }; + } + } + + function addSupportForElementReferenceInPositionParam(config) { + if (config.errorMessagePosition && typeof config.errorMessagePosition === 'object') { + $.formUtils.warn('Deprecated use of config parameter errorMessagePosition, use config.submitErrorMessageCallback instead'); + var $errorMessageContainer = config.errorMessagePosition; + config.errorMessagePosition = 'top'; + config.submitErrorMessageCallback = function() { + return $errorMessageContainer; + }; + } + } + + function addSupportForValidationDependingOnCheckedInput($form) { + var $inputsDependingOnCheckedInputs = $form.find('[data-validation-if-checked]'); + if ($inputsDependingOnCheckedInputs.length) { + $.formUtils.warn( + 'Detected use of attribute "data-validation-if-checked" which is '+ + 'deprecated. Use "data-validation-depends-on" provided by module "logic"' + ); + } + + $inputsDependingOnCheckedInputs + .on('beforeValidation', function() { + + var $elem = $(this), + nameOfDependingInput = $elem.valAttr('if-checked'); + + // Set the boolean telling us that the validation depends + // on another input being checked + var $dependingInput = $('input[name="' + nameOfDependingInput + '"]', $form), + dependingInputIsChecked = $dependingInput.is(':checked'), + valueOfDependingInput = ($.formUtils.getValue($dependingInput) || '').toString(), + requiredValueOfDependingInput = $elem.valAttr('if-checked-value'); + + if (!dependingInputIsChecked || !( + !requiredValueOfDependingInput || + requiredValueOfDependingInput === valueOfDependingInput + )) { + $elem.valAttr('skipped', true); + } + + }); + } + + function convertDeprecatedLangCodeToISO6391(config) { + var deprecatedLangCodes = { + se: 'sv', + cz: 'cs', + dk: 'da' + }; + + if (config.lang in deprecatedLangCodes) { + var newLangCode = deprecatedLangCodes[config.lang]; + $.formUtils.warn( + 'Deprecated use of lang code "'+config.lang+'" use "'+newLangCode+'" instead' + ); + config.lang = newLangCode; + } + } + +})(jQuery); + +/** + * Utility methods used for displaying error messages (attached to $.formUtils) */ (function ($) { 'use strict'; - var $window = $(window), - _getInputParentContainer = function ($elem) { + var dialogs = { + + resolveErrorMessage: function($elem, validator, validatorName, conf, language) { + var errorMsgAttr = conf.validationErrorMsgAttribute + '-' + validatorName.replace('validate_', ''), + validationErrorMsg = $elem.attr(errorMsgAttr); + + if (!validationErrorMsg) { + validationErrorMsg = $elem.attr(conf.validationErrorMsgAttribute); + if (!validationErrorMsg) { + if (typeof validator.errorMessageKey !== 'function') { + validationErrorMsg = language[validator.errorMessageKey]; + } + else { + validationErrorMsg = language[validator.errorMessageKey(conf)]; + } + if (!validationErrorMsg) { + validationErrorMsg = validator.errorMessage; + } + } + } + return validationErrorMsg; + }, + getParentContainer: function ($elem) { if ($elem.valAttr('error-msg-container')) { return $($elem.valAttr('error-msg-container')); } else { var $parent = $elem.parent(); - if ( !$parent.hasClass('form-group') && !$parent.closest('form').hasClass('form-horizontal') ) { - var $formGroup = $parent.closest('.form-group'); - if ($formGroup.length) { - return $formGroup.eq(0); - } + if($elem.attr('type') === 'checkbox' && $elem.closest('.checkbox').length) { + $parent = $elem.closest('.checkbox').parent(); + } else if($elem.attr('type') === 'radio' && $elem.closest('.radio').length) { + $parent = $elem.closest('.radio').parent(); + } + if($parent.closest('.input-group').length) { + $parent = $parent.closest('.input-group').parent(); } return $parent; } }, - _applyErrorStyle = function ($elem, conf) { - $elem + applyInputErrorStyling: function ($input, conf) { + $input .addClass(conf.errorElementClass) - .removeClass('valid'); + .removeClass(conf.successElementClass); - _getInputParentContainer($elem) + this.getParentContainer($input) .addClass(conf.inputParentClassOnError) .removeClass(conf.inputParentClassOnSuccess); if (conf.borderColorOnError !== '') { - $elem.css('border-color', conf.borderColorOnError); + $input.css('border-color', conf.borderColorOnError); } }, - _removeErrorStyle = function ($elem, conf) { - $elem.each(function () { - var $this = $(this); - - _setInlineErrorMessage($this, '', conf, conf.errorMessagePosition); - - $this - .removeClass('valid') - .removeClass(conf.errorElementClass) - .css('border-color', ''); - - _getInputParentContainer($this) - .removeClass(conf.inputParentClassOnError) - .removeClass(conf.inputParentClassOnSuccess) - .find('.' + conf.errorMessageClass) // remove inline span holding error message - .remove(); - }); + applyInputSuccessStyling: function($input, conf) { + $input.addClass(conf.successElementClass); + this.getParentContainer($input) + .addClass(conf.inputParentClassOnSuccess); }, - _setInlineErrorMessage = function ($input, mess, conf, $messageContainer) { - var custom = document.getElementById($input.attr('name') + '_err_msg'), - setErrorMessage = function($elem) { - $window.trigger('validationErrorDisplay', [$input, $elem]); - $elem.html(mess); - }, - $mess = {}; + removeInputStylingAndMessage: function($input, conf) { - if (custom) { - setErrorMessage($(custom)); - } - else if (typeof $messageContainer === 'object') { - var $found = false; - $messageContainer.find('.' + conf.errorMessageClass).each(function () { - if (this.inputReferer === $input[0]) { - $found = $(this); - return false; - } - }); - if ($found) { - if (!mess) { - $found.remove(); - } else { - setErrorMessage($found); - } - } else { - $mess = $('
'); - setErrorMessage($mess); - $mess[0].inputReferer = $input[0]; - $messageContainer.prepend($mess); + // Reset input css + $input + .removeClass(conf.successElementClass) + .removeClass(conf.errorElementClass) + .css('border-color', ''); + + var $parentContainer = dialogs.getParentContainer($input); + + // Reset parent css + $parentContainer + .removeClass(conf.inputParentClassOnError) + .removeClass(conf.inputParentClassOnSuccess); + + // Remove possible error message + if (typeof conf.inlineErrorMessageCallback === 'function') { + var $errorMessage = conf.inlineErrorMessageCallback($input, false, conf); + if ($errorMessage) { + $errorMessage.html(''); } + } else { + $parentContainer + .find('.' + conf.errorMessageClass) + .remove(); } - else { - var $parent = _getInputParentContainer($input); - $mess = $parent.find('.' + conf.errorMessageClass + '.help-block'); - if ($mess.length === 0) { - $mess = $('').addClass('help-block').addClass(conf.errorMessageClass); - $mess.appendTo($parent); + }, + removeAllMessagesAndStyling: function($form, conf) { + + // Remove error messages in top of form + if (typeof conf.submitErrorMessageCallback === 'function') { + var $errorMessagesInTopOfForm = conf.submitErrorMessageCallback($form, false, conf); + if ($errorMessagesInTopOfForm) { + $errorMessagesInTopOfForm.html(''); } + } else { + $form.find('.' + conf.errorMessageClass + '.alert').remove(); + } + + // Remove input css/messages + $form.find('.' + conf.errorElementClass + ',.' + conf.successElementClass).each(function() { + dialogs.removeInputStylingAndMessage($(this), conf); + }); + }, + setInlineMessage: function ($input, errorMsg, conf) { + + this.applyInputErrorStyling($input, conf); - setErrorMessage($mess); + var custom = document.getElementById($input.attr('name') + '_err_msg'), + $messageContainer = false, + setErrorMessage = function ($elem) { + $.formUtils.$win.trigger('validationErrorDisplay', [$input, $elem]); + $elem.html(errorMsg); + }, + addErrorToMessageContainer = function() { + var $found = false; + $messageContainer.find('.' + conf.errorMessageClass).each(function () { + if (this.inputReferer === $input[0]) { + $found = $(this); + return false; + } + }); + if ($found) { + if (!errorMsg) { + $found.remove(); + } else { + setErrorMessage($found); + } + } else if(errorMsg !== '') { + $message = $('
'); + setErrorMessage($message); + $message[0].inputReferer = $input[0]; + $messageContainer.prepend($message); + } + }, + $message; + + if (custom) { + // Todo: remove in 3.0 + $.formUtils.warn('Using deprecated element reference ' + custom.id); + $messageContainer = $(custom); + addErrorToMessageContainer(); + } else if (typeof conf.inlineErrorMessageCallback === 'function') { + $messageContainer = conf.inlineErrorMessageCallback($input, errorMsg, conf); + if (!$messageContainer) { + // Error display taken care of by inlineErrorMessageCallback + return; + } + addErrorToMessageContainer(); + } else { + var $parent = this.getParentContainer($input); + $message = $parent.find('.' + conf.errorMessageClass + '.help-block'); + if ($message.length === 0) { + $message = $('').addClass('help-block').addClass(conf.errorMessageClass); + $message.appendTo($parent); + } + setErrorMessage($message); } }, - _templateMessage = function ($form, title, errorMessages, conf) { - var messages = conf.errorMessageTemplate.messages.replace(/\{errorTitle\}/g, title), - fields = [], - container; + setMessageInTopOfForm: function ($form, errorMessages, conf, lang) { + var view = '
'+ + '{errorTitle}'+ + '
    {fields}
'+ + '
', + $container = false; + + if (typeof conf.submitErrorMessageCallback === 'function') { + $container = conf.submitErrorMessageCallback($form, errorMessages, conf); + if (!$container) { + // message display taken care of by callback + return; + } + } + + var viewParams = { + errorTitle: lang.errorTitle, + fields: '', + errorMessageClass: conf.errorMessageClass + }; $.each(errorMessages, function (i, msg) { - fields.push(conf.errorMessageTemplate.field.replace(/\{msg\}/g, msg)); + viewParams.fields += '
  • '+msg+'
  • '; }); - messages = messages.replace(/\{fields\}/g, fields.join('')); - container = conf.errorMessageTemplate.container.replace(/\{errorMessageClass\}/g, conf.errorMessageClass); - container = container.replace(/\{messages\}/g, messages); - $form.children().eq(0).before(container); - }; + $.each(viewParams, function(param, value) { + view = view.replace('{'+param+'}', value); + }); + + if ($container) { + $container.html(view); + } else { + $form.children().eq(0).before($(view)); + } + } + }; + + $.formUtils = $.extend($.formUtils || {}, { + dialogs: dialogs + }); + +})(jQuery); + +/** + * File declaring all methods if this plugin which is applied to $.fn. + */ +(function($, window, undefined) { + + 'use strict'; + + var _helpers = 0; /** @@ -125,10 +525,28 @@ * @return {jQuery} */ $.fn.validateOnBlur = function (language, conf) { - this.find('*[data-validation]') - .bind('blur.validation', function () { - $(this).validateInputOnBlur(language, conf, true, 'blur'); - }); + var $form = this, + $elems = this.find('*[data-validation]'); + + $elems.each(function(){ + var $this = $(this); + if ($this.is('[type=radio]')){ + var $additionals = $form.find('[type=radio][name="' + $this.attr('name') + '"]'); + $additionals.bind('blur.validation', function(){ + $this.validateInputOnBlur(language, conf, true, 'blur'); + }); + if (conf.validateCheckboxRadioOnClick) { + $additionals.bind('click.validation', function () { + $this.validateInputOnBlur(language, conf, true, 'click'); + }); + } + } + }); + + $elems.bind('blur.validation', function () { + $(this).validateInputOnBlur(language, conf, true, 'blur'); + }); + if (conf.validateCheckboxRadioOnClick) { // bind click event to validate on click for radio & checkboxes for nice UX this.find('input[type=checkbox][data-validation],input[type=radio][data-validation]') @@ -146,16 +564,23 @@ * @param {Object} settings Optional, will override the default settings * * @return {jQuery} */ - $.fn.validateOnEvent = function (language, settings) { - this.find('*[data-validation-event]') + $.fn.validateOnEvent = function (language, config) { + if(this.length === 0) { + return; + } + + var $elements = this[0].nodeName === 'FORM' ? this.find('*[data-validation-event]') : this; + $elements .each(function () { var $el = $(this), - etype = $el.valAttr('event'); + etype = $el.valAttr('event'); if (etype) { $el .unbind(etype + '.validation') - .bind(etype + '.validation', function () { - $(this).validateInputOnBlur(language, settings, true, etype); + .bind(etype + '.validation', function (evt) { + if( (evt || {}).keyCode !== 9 ) { + $(this).validateInputOnBlur(language, config, true, etype); + } }); } }); @@ -175,36 +600,35 @@ attrName = 'data-validation-help'; } - // Remove previously added event listeners - this.find('.has-help-txt') - .valAttr('has-keyup-event', false) - .removeClass('has-help-txt'); - // Add help text listeners this.find('textarea,input').each(function () { var $elem = $(this), - className = 'jquery_form_help_' + ($elem.attr('name') || '').replace(/(:|\.|\[|\])/g, ''), - help = $elem.attr(attrName); + className = 'jquery_form_help_' + (++_helpers), + help = $elem.attr(attrName); + + // Reset + $elem + .removeClass('has-help-text') + .unbind('focus.help') + .unbind('blur.help'); if (help) { $elem .addClass('has-help-txt') - .unbind('focus.help') .bind('focus.help', function () { var $help = $elem.parent().find('.' + className); if ($help.length === 0) { $help = $('') - .addClass(className) - .addClass('help') - .addClass('help-block') // twitter bs - .text(help) - .hide(); + .addClass(className) + .addClass('help') + .addClass('help-block') // twitter bs + .text(help) + .hide(); $elem.after($help); } $help.fadeIn(); }) - .unbind('blur.help') .bind('blur.help', function () { $(this) .parent() @@ -226,7 +650,8 @@ var language = $.extend({}, $.formUtils.LANG, lang || {}); this.each(function() { var $elem = $(this), - formDefaultConfig = $elem.closest('form').get(0).validationConfig || {}; + closestFormElem = $elem.closest('form').get(0) || {}, + formDefaultConfig = closestFormElem.validationConfig || $.formUtils.defaultConfig(); $elem.one('validation', function(evt, isValid) { if ( typeof cb === 'function' ) { @@ -235,10 +660,10 @@ }); $elem.validateInputOnBlur( - language, - $.extend({}, formDefaultConfig, conf || {}), - true - ); + language, + $.extend({}, formDefaultConfig, conf || {}), + true + ); }); }; @@ -248,9 +673,9 @@ */ $.fn.willPostponeValidation = function() { return (this.valAttr('suggestion-nr') || - this.valAttr('postpone') || - this.hasClass('hasDatepicker')) && - !window.postponedValidation; + this.valAttr('postpone') || + this.hasClass('hasDatepicker')) && + !window.postponedValidation; }; /** @@ -261,20 +686,20 @@ * @param {Object} [language] Optional, will override $.formUtils.LANG * @param {Object} [conf] Optional, will override the default settings * @param {Boolean} attachKeyupEvent Optional - * @param {String} eventType + * @param {String} eventContext * @return {jQuery} */ - $.fn.validateInputOnBlur = function (language, conf, attachKeyupEvent, eventType) { + $.fn.validateInputOnBlur = function (language, conf, attachKeyupEvent, eventContext) { - $.formUtils.eventType = eventType; + $.formUtils.eventType = eventContext; if ( this.willPostponeValidation() ) { // This validation has to be postponed var _self = this, - postponeTime = this.valAttr('postpone') || 200; + postponeTime = this.valAttr('postpone') || 200; window.postponedValidation = function () { - _self.validateInputOnBlur(language, conf, attachKeyupEvent, eventType); + _self.validateInputOnBlur(language, conf, attachKeyupEvent, eventContext); window.postponedValidation = false; }; @@ -288,38 +713,75 @@ } language = $.extend({}, $.formUtils.LANG, language || {}); - _removeErrorStyle(this, conf); + $.formUtils.dialogs.removeInputStylingAndMessage(this, conf); + var $elem = this, - $form = $elem.closest('form'), - result = $.formUtils.validateInput( - $elem, - language, - conf, - $form, - eventType - ); - - if ( result.isValid ) { - if( result.shouldChangeDisplay ) { - $elem.addClass('valid'); - _getInputParentContainer($elem) - .addClass(conf.inputParentClassOnSuccess); + $form = $elem.closest('form'), + result = $.formUtils.validateInput( + $elem, + language, + conf, + $form, + eventContext + ); + + var reValidate = function() { + $elem.validateInputOnBlur(language, conf, false, 'blur.revalidated'); + }; + + if (eventContext === 'blur') { + $elem + .unbind('validation.revalidate', reValidate) + .one('validation.revalidate', reValidate); + } + + if (attachKeyupEvent) { + $elem.removeKeyUpValidation(); + } + + if (result.shouldChangeDisplay) { + if (result.isValid) { + $.formUtils.dialogs.applyInputSuccessStyling($elem, conf); + } else { + $.formUtils.dialogs.setInlineMessage($elem, result.errorMsg, conf); } } - else if (!result.isValid) { - _applyErrorStyle($elem, conf); - _setInlineErrorMessage($elem, result.errorMsg, conf, conf.errorMessagePosition); + if (!result.isValid && attachKeyupEvent) { + $elem.validateOnKeyUp(language, conf); + } - if (attachKeyupEvent) { - $elem - .unbind('keyup.validation') - .bind('keyup.validation', function () { - $(this).validateInputOnBlur(language, conf, false, 'keyup'); + return this; + }; + + /** + * Validate element on keyup-event + */ + $.fn.validateOnKeyUp = function(language, conf) { + this.each(function() { + var $input = $(this); + if (!$input.valAttr('has-keyup-event')) { + $input + .valAttr('has-keyup-event', 'true') + .bind('keyup.validation', function (evt) { + if( evt.keyCode !== 9 ) { + $input.validateInputOnBlur(language, conf, false, 'keyup'); + } }); } - } + }); + return this; + }; + /** + * Remove validation on keyup + */ + $.fn.removeKeyUpValidation = function() { + this.each(function() { + $(this) + .valAttr('has-keyup-event', false) + .unbind('keyup.validation'); + }); return this; }; @@ -329,7 +791,7 @@ * * @param {String} name * @param {String|Boolean} [val] - * @return string|undefined + * @return {String|undefined|jQuery} * @protected */ $.fn.valAttr = function (name, val) { @@ -371,9 +833,6 @@ displayError = false; } - $.formUtils.isValidatingEntireForm = true; - $.formUtils.haltValidation = false; - /** * Adds message to error message stack if not already in the message stack * @@ -381,27 +840,27 @@ * @para {jQuery} $elem */ var addErrorMessage = function (mess, $elem) { - if ($.inArray(mess, errorMessages) < 0) { - errorMessages.push(mess); - } - errorInputs.push($elem); - $elem.attr('current-error', mess); - if (displayError) { - _applyErrorStyle($elem, conf); - } - }, + if ($.inArray(mess, errorMessages) < 0) { + errorMessages.push(mess); + } + errorInputs.push($elem); + $elem.valAttr('current-error', mess); + if (displayError) { + $.formUtils.dialogs.applyInputErrorStyling($elem, conf); + } + }, - /** Holds inputs (of type checkox or radio) already validated, to prevent recheck of mulitple checkboxes & radios */ - checkedInputs = [], + /** Holds inputs (of type checkox or radio) already validated, to prevent recheck of mulitple checkboxes & radios */ + checkedInputs = [], - /** Error messages for this validation */ - errorMessages = [], + /** Error messages for this validation */ + errorMessages = [], - /** Input elements which value was not valid */ - errorInputs = [], + /** Input elements which value was not valid */ + errorInputs = [], - /** Form instance */ - $form = this, + /** Form instance */ + $form = this, /** * Tells whether or not to validate element with this name and of this type @@ -410,7 +869,7 @@ * @param {String} type * @return {Boolean} */ - ignoreInput = function (name, type) { + ignoreInput = function (name, type) { if (type === 'submit' || type === 'button' || type === 'reset') { return true; } @@ -419,8 +878,7 @@ // Reset style and remove error class if (displayError) { - $form.find('.' + conf.errorMessageClass + '.alert').remove(); - _removeErrorStyle($form.find('.' + conf.errorElementClass + ',.valid'), conf); + $.formUtils.dialogs.removeAllMessagesAndStyling($form, conf); } // Validate element values @@ -437,26 +895,21 @@ } var result = $.formUtils.validateInput( - $elem, - language, - conf, - $form, - 'submit' - ); - - if( result.shouldChangeDisplay ) { - if ( !result.isValid ) { - addErrorMessage(result.errorMsg, $elem); - } else if( result.isValid ) { - $elem - .valAttr('current-error', false) - .addClass('valid'); - - _getInputParentContainer($elem) - .addClass(conf.inputParentClassOnSuccess); - } + $elem, + language, + conf, + $form, + 'submit' + ); + + if (!result.isValid) { + addErrorMessage(result.errorMsg, $elem); + } else if (result.isValid && result.shouldChangeDisplay) { + $elem.valAttr('current-error', false); + $.formUtils.dialogs.applyInputSuccessStyling($elem, conf); } } + }); // Run validation callback @@ -476,97 +929,243 @@ $.formUtils.isValidatingEntireForm = false; // Validation failed - if (!$.formUtils.haltValidation && errorInputs.length > 0) { + if (errorInputs.length > 0) { + if (displayError) { + if (conf.errorMessagePosition === 'top') { + $.formUtils.dialogs.setMessageInTopOfForm($form, errorMessages, conf, language); + } else { + $.each(errorInputs, function (i, $input) { + $.formUtils.dialogs.setInlineMessage($input, $input.valAttr('current-error'), conf); + }); + } + if (conf.scrollToTopOnError) { + $.formUtils.$win.scrollTop($form.offset().top - 20); + } + } + } + + if (!displayError && $.formUtils.haltValidation) { + $.formUtils.errorDisplayPreventedWhenHalted = true; + } + + return errorInputs.length === 0 && !$.formUtils.haltValidation; + }; + + /** + * Plugin for displaying input length restriction + */ + $.fn.restrictLength = function (maxLengthElement) { + new $.formUtils.lengthRestriction(this, maxLengthElement); + return this; + }; + + /** + * Add suggestion dropdown to inputs having data-suggestions with a comma + * separated string with suggestions + * @param {Array} [settings] + * @returns {jQuery} + */ + $.fn.addSuggestions = function (settings) { + var sugs = false; + this.find('input').each(function () { + var $field = $(this); + + sugs = $.split($field.attr('data-suggestions')); + + if (sugs.length > 0 && !$field.hasClass('has-suggestions')) { + $.formUtils.suggest($field, sugs, settings); + $field.addClass('has-suggestions'); + } + }); + return this; + }; + + +})(jQuery, window); + +/** + * Utility methods used for handling loading of modules (attached to $.formUtils) + */ +(function($) { + + 'use strict'; + + $.formUtils = $.extend($.formUtils || {}, { + + /** + * @var {Boolean} + */ + isLoadingModules: false, + + /** + * @var {Object} + */ + loadedModules: {}, + + /** + * @param {String} name + */ + registerLoadedModule: function (name) { + this.loadedModules[$.trim(name).toLowerCase()] = true; + }, + + /** + * @param {String} name + * @return {Boolean} + */ + hasLoadedModule: function (name) { + return $.trim(name).toLowerCase() in this.loadedModules; + }, + + /** + * @example + * $.formUtils.loadModules('date, security.dev'); + * + * Will load the scripts date.js and security.dev.js from the + * directory where this script resides. If you want to load + * the modules from another directory you can use the + * path argument. + * + * The script will be cached by the browser unless the module + * name ends with .dev + * + * @param {String} modules - Comma separated string with module file names (no directory nor file extension) + * @param {String} [path] - Path where the module files are located if their not in the same directory as the core modules + * @param {function} [callback] - Callback invoked when all modules are loaded + */ + loadModules: function (modules, path, callback) { + + if ($.formUtils.isLoadingModules) { + setTimeout(function () { + $.formUtils.loadModules(modules, path, callback); + }, 100); + return; + } + + var loadModuleScripts = function (modules, path) { + + var moduleList = $.split(modules), + numModules = moduleList.length, + moduleLoadedCallback = function () { + numModules--; + if (numModules === 0) { + $.formUtils.isLoadingModules = false; + if (typeof callback === 'function') { + callback(); + } + } + }; + + if (numModules > 0) { + $.formUtils.isLoadingModules = true; + } + + var cacheSuffix = '?_=' + ( new Date().getTime() ), + appendToElement = document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]; + + $.each(moduleList, function (i, modName) { + modName = $.trim(modName); + if (modName.length === 0 || $.formUtils.hasLoadedModule(modName)) { + moduleLoadedCallback(); + } else { + var scriptUrl = path + modName + (modName.slice(-3) === '.js' ? '' : '.js'), + script = document.createElement('SCRIPT'); + + if (typeof define === 'function' && define.amd) { + require([scriptUrl + ( scriptUrl.slice(-7) === '.dev.js' ? cacheSuffix : '' )], moduleLoadedCallback); + } else { + // Load the script + script.type = 'text/javascript'; + script.onload = moduleLoadedCallback; + script.src = scriptUrl + ( scriptUrl.slice(-7) === '.dev.js' ? cacheSuffix : '' ); + script.onerror = function() { + $.formUtils.warn('Unable to load form validation module '+scriptUrl, true); + moduleLoadedCallback(); + }; + script.onreadystatechange = function () { + // IE 7 fix + if (this.readyState === 'complete' || this.readyState === 'loaded') { + moduleLoadedCallback(); + // Handle memory leak in IE + this.onload = null; + this.onreadystatechange = null; + } + }; + appendToElement.appendChild(script); + } + } + }); + }; + + if (path) { + loadModuleScripts(modules, path); + } else { + var findScriptPathAndLoadModules = function () { + var foundPath = false; + $('script[src*="form-validator"]').each(function () { + var isScriptFromPluginNodeModulesDirectory = this.src.split('form-validator')[1].split('node_modules').length > 1; + if (!isScriptFromPluginNodeModulesDirectory) { + foundPath = this.src.substr(0, this.src.lastIndexOf('/')) + '/'; + if (foundPath === '/') { + foundPath = ''; + } + return false; + } + }); - if (displayError) { - // display all error messages in top of form - if (conf.errorMessagePosition === 'top') { - _templateMessage($form, language.errorTitle, errorMessages, conf); - } - // Customize display message - else if (conf.errorMessagePosition === 'custom') { - if (typeof conf.errorMessageCustom === 'function') { - conf.errorMessageCustom($form, language.errorTitle, errorMessages, conf); + if (foundPath !== false) { + loadModuleScripts(modules, foundPath); + return true; } - } - // Display error message below input field or in defined container - else { - $.each(errorInputs, function (i, $input) { - _setInlineErrorMessage($input, $input.attr('current-error'), conf, conf.errorMessagePosition); - }); - } + return false; + }; - if (conf.scrollToTopOnError) { - $window.scrollTop($form.offset().top - 20); + if (!findScriptPathAndLoadModules()) { + $(function () { + var hasLoadedModuleScripts = findScriptPathAndLoadModules(); + if (!hasLoadedModuleScripts) { + // The modules may have been inserted via a minified script + if (typeof callback === 'function') { + callback(); + } + } + }); } } - - return false; - } - - if (!displayError && $.formUtils.haltValidation) { - $.formUtils.errorDisplayPreventedWhenHalted = true; } - return !$.formUtils.haltValidation; - }; - - /** - * @deprecated - * @param language - * @param conf - */ - $.fn.validateForm = function (language, conf) { - if (window.console && typeof window.console.warn === 'function') { - window.console.warn('Use of deprecated function $.validateForm, use $.isValid instead'); - } - return this.isValid(language, conf, true); - }; + }); - /** - * Plugin for displaying input length restriction - */ - $.fn.restrictLength = function (maxLengthElement) { - new $.formUtils.lengthRestriction(this, maxLengthElement); - return this; - }; +})(jQuery); - /** - * Add suggestion dropdown to inputs having data-suggestions with a comma - * separated string with suggestions - * @param {Array} [settings] - * @returns {jQuery} - */ - $.fn.addSuggestions = function (settings) { - var sugs = false; - this.find('input').each(function () { - var $field = $(this); +/** + * Setup function for the plugin + */ +(function ($) { - sugs = $.split($field.attr('data-suggestions')); + 'use strict'; - if (sugs.length > 0 && !$field.hasClass('has-suggestions')) { - $.formUtils.suggest($field, sugs, settings); - $field.addClass('has-suggestions'); - } - }); - return this; - }; /** * A bit smarter split function * delimiter can be space, comma, dash or pipe * @param {String} val * @param {Function|String} [callback] + * @param {Boolean} [allowSpaceAsDelimiter] * @returns {Array|void} */ - $.split = function (val, callback) { + $.split = function (val, callback, allowSpaceAsDelimiter) { + // default to true + allowSpaceAsDelimiter = allowSpaceAsDelimiter === undefined || allowSpaceAsDelimiter === true; + var pattern = '[,|'+(allowSpaceAsDelimiter ? '\\s':'')+'-]\\s*', + regex = new RegExp(pattern, 'g'); if (typeof callback !== 'function') { // return array if (!val) { return []; } var values = []; - $.each(val.split(callback ? callback : /[,|\-\s]\s*/g), + $.each(val.split(callback ? callback : regex), function (i, str) { str = $.trim(str); if (str.length) { @@ -577,7 +1176,7 @@ return values; } else if (val) { // exec callback func on each - $.each(val.split(/[,|\-\s]\s*/g), + $.each(val.split(regex), function (i, str) { str = $.trim(str); if (str.length) { @@ -596,9 +1195,6 @@ var defaultConf = $.extend($.formUtils.defaultConfig(), { form: 'form', - /* - * Enable custom event for validation - */ validateOnEvent: false, validateOnBlur: true, validateCheckboxRadioOnClick: true, @@ -609,11 +1205,13 @@ language: false, onSuccess: false, onError: false, - onElementValidate: false, + onElementValidate: false }); conf = $.extend(defaultConf, conf || {}); + $(window).trigger('formValidationPluginInit', [conf]); + if( conf.lang && conf.lang !== 'en' ) { var langModule = 'lang/'+conf.lang+'.js'; conf.modules += conf.modules.length ? ','+langModule : langModule; @@ -625,9 +1223,9 @@ // Make a reference to the config for this form form.validationConfig = conf; - // Trigger jQuery event that we're about to setup va + // Trigger jQuery event that we're about to setup validation var $form = $(form); - $window.trigger('formValidationSetup', [$form, conf]); + $form.trigger('formValidationSetup', [$form, conf]); // Remove classes and event handlers that might have been // added by a previous call to $.validate @@ -643,45 +1241,46 @@ .unbind('blur.validation'); // Validate when submitted - $form.bind('submit.validation', function () { + $form.bind('submit.validation', function (evt) { - var $form = $(this); + var $form = $(this), + stop = function() { + evt.stopImmediatePropagation(); + return false; + }; if ($.formUtils.haltValidation) { // pressing several times on submit button while validation is halted - return false; + return stop(); } if ($.formUtils.isLoadingModules) { setTimeout(function () { $form.trigger('submit.validation'); }, 200); - return false; + return stop(); } var valid = $form.isValid(conf.language, conf); - if ($.formUtils.haltValidation) { // Validation got halted by one of the validators - return false; + return stop(); } else { if (valid && typeof conf.onSuccess === 'function') { var callbackResponse = conf.onSuccess($form); if (callbackResponse === false) { - return false; + return stop(); } } else if (!valid && typeof conf.onError === 'function') { conf.onError($form); - return false; + return stop(); } else { - return valid; + return valid ? true : stop(); } } }) .bind('reset.validation', function () { - // remove messages - $(this).find('.' + conf.errorMessageClass + '.alert').remove(); - _removeErrorStyle($(this).find('.' + conf.errorElementClass + ',.valid'), conf); + $.formUtils.dialogs.removeAllMessagesAndStyling($form, conf); }) .addClass('has-validation-callback'); @@ -703,38 +1302,49 @@ }); if (conf.modules !== '') { - $.formUtils.loadModules(conf.modules, false, function() { + $.formUtils.loadModules(conf.modules, null, function() { if (typeof conf.onModulesLoaded === 'function') { conf.onModulesLoaded(); } - $window.trigger('validatorsLoaded', [typeof conf.form === 'string' ? $(conf.form) : conf.form, conf]); + var $form = typeof conf.form === 'string' ? $(conf.form) : conf.form; + $.formUtils.$win.trigger('validatorsLoaded', [$form, conf]); }); } }; - /** - * Object containing utility methods for this plugin - */ - $.formUtils = { +})(jQuery); + +/** + * Utility methods and properties attached to $.formUtils + */ +(function($, window) { + + 'use strict'; + + var $win = $(window); + + $.formUtils = $.extend($.formUtils || {}, { + + $win: $win, /** * Default config for $(...).isValid(); */ defaultConfig: function () { return { - ignore: [], // Names of inputs not to be validated even though node attribute containing the validation rules tells us to + ignore: [], // Names of inputs not to be validated even though `validationRuleAttribute` containing the validation rules tells us to errorElementClass: 'error', // Class that will be put on elements which value is invalid + successElementClass: 'valid', // Class that will be put on elements that has been validated with success borderColorOnError: '#b94a48', // Border color of elements which value is invalid, empty string to not change border color errorMessageClass: 'form-error', // class name of div containing error messages when validation fails validationRuleAttribute: 'data-validation', // name of the attribute holding the validation rules validationErrorMsgAttribute: 'data-validation-error-msg', // define custom err msg inline with element - errorMessagePosition: 'element', // Can be either "top" or "element" or "custom" + errorMessagePosition: 'inline', // Can be either "top" or "inline" errorMessageTemplate: { container: '
    {messages}
    ', messages: '{errorTitle}
      {fields}
    ', field: '
  • {msg}
  • ' }, - errorMessageCustom: _templateMessage, scrollToTopOnError: true, dateFormat: 'yyyy-mm-dd', addValidClassOnAll: false, // whether or not to apply class="valid" even if the input wasn't validated @@ -742,6 +1352,8 @@ inputParentClassOnError: 'has-error', // twitter-bootstrap default class name inputParentClassOnSuccess: 'has-success', // twitter-bootstrap default class name validateHiddenInputs: false, // whether or not hidden inputs should be validated + inlineErrorMessageCallback: false, + submitErrorMessageCallback: false }; }, @@ -750,6 +1362,11 @@ */ validators: {}, + /** + * Available sanitizers + */ + sanitizers: {}, + /** * Events triggered by form validator */ @@ -762,14 +1379,9 @@ */ haltValidation: false, - /** - * This variable will be true $.fn.isValid() is called - * and false when $.fn.validateOnBlur is called - */ - isValidatingEntireForm: false, - /** * Function for adding a validator + * @see $.formUtils.addAsyncValidator (async.js) * @param {Object} validator */ addValidator: function (validator) { @@ -782,138 +1394,51 @@ }, /** - * @var {Boolean} + * Function for adding a sanitizer + * @param {Object} sanitizer */ - isLoadingModules: false, + addSanitizer: function (sanitizer) { + this.sanitizers[sanitizer.name] = sanitizer; + }, /** - * @var {Object} + * Warn user via the console if available */ - loadedModules: {}, + warn: function(msg, fallbackOnAlert) { + if( 'console' in window ) { + if( typeof window.console.warn === 'function' ) { + window.console.warn(msg); + } else if( typeof window.console.log === 'function' ) { + window.console.log(msg); + } + } else if (fallbackOnAlert) { + // This is for some old IE version... + alert(msg); + } + }, /** + * Same as input $.fn.val() but also supporting input of typ radio or checkbox * @example - * $.formUtils.loadModules('date, security.dev'); - * - * Will load the scripts date.js and security.dev.js from the - * directory where this script resides. If you want to load - * the modules from another directory you can use the - * path argument. * - * The script will be cached by the browser unless the module - * name ends with .dev + * $.formUtils.getValue('.myRadioButtons', $('#some-form')); + * $.formUtils.getValue($('#some-form').find('.check-boxes')); * - * @param {String} modules - Comma separated string with module file names (no directory nor file extension) - * @param {String} [path] - Optional, path where the module files is located if their not in the same directory as the core modules - * @param {Boolean|function} [fireEvent] - Optional, whether or not to fire event 'load' when modules finished loading + * @param query + * @param $parent + * @returns {String|Boolean} */ - loadModules: function (modules, path, fireEvent) { - - if (fireEvent === undefined) { - fireEvent = true; - } - - if ($.formUtils.isLoadingModules) { - setTimeout(function () { - $.formUtils.loadModules(modules, path, fireEvent); - }); - return; - } - - var hasLoadedAnyModule = false, - loadModuleScripts = function (modules, path) { - - var moduleList = $.split(modules), - numModules = moduleList.length, - moduleLoadedCallback = function () { - numModules--; - if (numModules === 0) { - $.formUtils.isLoadingModules = false; - if (fireEvent && hasLoadedAnyModule) { - if( typeof fireEvent === 'function' ) { - fireEvent(); - } else { - $window.trigger('validatorsLoaded'); - } - } - } - }; - - - if (numModules > 0) { - $.formUtils.isLoadingModules = true; - } - - var cacheSuffix = '?_=' + ( new Date().getTime() ), - appendToElement = document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]; - - $.each(moduleList, function (i, modName) { - modName = $.trim(modName); - if (modName.length === 0) { - moduleLoadedCallback(); - } - else { - var scriptUrl = path + modName + (modName.slice(-3) === '.js' ? '' : '.js'), - script = document.createElement('SCRIPT'); - - if (scriptUrl in $.formUtils.loadedModules) { - // already loaded - moduleLoadedCallback(); - } - else { - - // Remember that this script is loaded - $.formUtils.loadedModules[scriptUrl] = 1; - hasLoadedAnyModule = true; - - // Load the script - script.type = 'text/javascript'; - script.onload = moduleLoadedCallback; - script.src = scriptUrl + ( scriptUrl.slice(-7) === '.dev.js' ? cacheSuffix : '' ); - script.onerror = function() { - if( 'console' in window && window.console.log ) { - window.console.log('Unable to load form validation module '+scriptUrl); - } - }; - script.onreadystatechange = function () { - // IE 7 fix - if (this.readyState === 'complete' || this.readyState === 'loaded') { - moduleLoadedCallback(); - // Handle memory leak in IE - this.onload = null; - this.onreadystatechange = null; - } - }; - appendToElement.appendChild(script); - } - } - }); - }; - - if (path) { - loadModuleScripts(modules, path); - } else { - var findScriptPathAndLoadModules = function () { - var foundPath = false; - $('script[src*="form-validator"]').each(function () { - foundPath = this.src.substr(0, this.src.lastIndexOf('/')) + '/'; - if (foundPath === '/') { - foundPath = ''; - } - return false; - }); - - if (foundPath !== false) { - loadModuleScripts(modules, foundPath); - return true; - } - return false; - }; - - if (!findScriptPathAndLoadModules()) { - $(findScriptPathAndLoadModules); + getValue: function(query, $parent) { + var $inputs = $parent ? $parent.find(query) : query; + if ($inputs.length > 0 ) { + var type = $inputs.eq(0).attr('type'); + if (type === 'radio' || type === 'checkbox') { + return $inputs.filter(':checked').val() || ''; + } else { + return $inputs.val() || ''; } } + return false; }, /** @@ -929,85 +1454,64 @@ */ validateInput: function ($elem, language, conf, $form, eventContext) { - $elem.trigger('beforeValidation'); conf = conf || $.formUtils.defaultConfig(); language = language || $.formUtils.LANG; - var value = $elem.val() || '', - result = {isValid: true, shouldChangeDisplay:true, errorMsg:''}, - optional = $elem.valAttr('optional'), - - // test if a checkbox forces this element to be validated - validationDependsOnCheckedInput = false, - validationDependentInputIsChecked = false, - validateIfCheckedElement = false, - - // get value of this element's attribute "... if-checked" - validateIfCheckedElementName = $elem.valAttr('if-checked'), - // get expected radio button value for "if-checked" optional validation - validateIfCheckedElementValue = $elem.valAttr('if-checked-value'); - - - if ($elem.attr('disabled') || (!$elem.is(':visible') && !conf.validateHiddenInputs)) { - result.shouldChangeDisplay = false; - return result; + if (!$form.length) { + $form = $elem.parent(); } - // make sure we can proceed - if (validateIfCheckedElementName != null) { - - // Set the boolean telling us that the validation depends - // on another input being checked - validationDependsOnCheckedInput = true; - - // select the checkbox type element in this form - validateIfCheckedElement = $form.find('input[name="' + validateIfCheckedElementName + '"]'); + var value = this.getValue($elem); - // test if check input value - if (validateIfCheckedElementValue != null) { - validateIfCheckedElement.each(function(index, el) { - // test if it's property "checked" is checked and value equals expected value - if ($(el).prop('checked') && $(el).val() === validateIfCheckedElementValue) { - validationDependentInputIsChecked = true; - } - }); - } - else { - // test if it's property "checked" is checked - if (validateIfCheckedElement.prop('checked')) { - // set value for validation checkpoint - validationDependentInputIsChecked = true; + $elem + .valAttr('skipped', false) + .one('beforeValidation', function() { + // Skip input because its hidden or disabled + // Doing this in a callback makes it possible for others to prevent the default + // behaviour by binding to the same event and call evt.stopImmediatePropagation() + if ($elem.attr('disabled') || (!$elem.is(':visible') && !conf.validateHiddenInputs)) { + $elem.valAttr('skipped', 1); } - } - } - - // validation checkpoint - // if empty AND optional attribute is present - // OR depending on a checkbox being checked AND checkbox is checked, return true - var isInvalidNumberInput = !value && $elem[0].type === 'number'; - if ((!value && optional === 'true' && !isInvalidNumberInput) || (validationDependsOnCheckedInput && !validationDependentInputIsChecked)) { + }) + .trigger('beforeValidation', [value, language, conf]); + + var inputIsOptional = $elem.valAttr('optional') === 'true', + skipBecauseItsEmpty = !value && inputIsOptional, + validationRules = $elem.attr(conf.validationRuleAttribute), + isValid = true, + errorMsg = '', + result = {isValid: true, shouldChangeDisplay:true, errorMsg:''}; + + // For input type="number", browsers attempt to parse the entered value into a number. + // If the input is not numeric, browsers handle the situation differently: + // Chrome 48 simply disallows non-numeric input; FF 44 clears out the input box on blur; + // Safari 5 parses the entered string to find a leading number. + // If the input fails browser validation, the browser sets the input value equal to an empty string. + // Therefore, we cannot distinguish (apart from hacks) between an empty input type="text" and one with a + // value that can't be parsed by the browser. + + if (!validationRules || skipBecauseItsEmpty || $elem.valAttr('skipped')) { result.shouldChangeDisplay = conf.addValidClassOnAll; return result; } - var validationRules = $elem.attr(conf.validationRuleAttribute), - - // see if form element has inline err msg attribute - validationErrorMsg = true; - - if (!validationRules) { - result.shouldChangeDisplay = conf.addValidClassOnAll; - return result; + // Filter out specified characters + var ignore = $elem.valAttr('ignore'); + if (ignore) { + $.each(ignore.split(''), function(i, character) { + value = value.replace(new RegExp('\\'+character, 'g'), ''); + }); } $.split(validationRules, function (rule) { + if (rule.indexOf('validate_') !== 0) { rule = 'validate_' + rule; } var validator = $.formUtils.validators[rule]; - if (validator && typeof validator.validatorFunction === 'function') { + if (validator) { // special change of element for checkbox_group rule if (rule === 'validate_checkbox_group') { @@ -1015,56 +1519,52 @@ $elem = $form.find('[name="' + $elem.attr('name') + '"]:eq(0)'); } - var isValid = null; if (eventContext !== 'keyup' || validator.validateOnKeyUp) { - isValid = validator.validatorFunction(value, $elem, conf, language, $form); + // A validator can prevent itself from getting triggered on keyup + isValid = validator.validatorFunction(value, $elem, conf, language, $form, eventContext); } if (!isValid) { - validationErrorMsg = null; - if (isValid !== null) { - validationErrorMsg = $elem.attr(conf.validationErrorMsgAttribute + '-' + rule.replace('validate_', '')); - if (!validationErrorMsg) { - validationErrorMsg = $elem.attr(conf.validationErrorMsgAttribute); - if (!validationErrorMsg) { - if (typeof validator.errorMessageKey !== 'function') { - validationErrorMsg = language[validator.errorMessageKey]; - } - else { - validationErrorMsg = language[validator.errorMessageKey(conf)]; - } - if (!validationErrorMsg) { - validationErrorMsg = validator.errorMessage; - } - } - } + if (conf.validateOnBlur) { + $elem.validateOnKeyUp(language, conf); } + errorMsg = $.formUtils.dialogs.resolveErrorMessage($elem, validator, rule, conf, language); return false; // break iteration } } else { - throw new Error('Using undefined validator "' + rule + '"'); + + // todo: Add some validator lookup function and tell immediately which module is missing + throw new Error('Using undefined validator "' + rule + + '". Maybe you have forgotten to load the module that "' + rule +'" belongs to?'); + } - }, ' '); + }); + - if (typeof validationErrorMsg === 'string') { + if (isValid === false) { $elem.trigger('validation', false); - result.errorMsg = validationErrorMsg; + result.errorMsg = errorMsg; result.isValid = false; result.shouldChangeDisplay = true; - } else if (validationErrorMsg === null) { - result.shouldChangeDisplay = conf.addValidClassOnAll; + } else if (isValid === null) { + // A validatorFunction returning null means that it's not able to validate + // the input at this time. Most probably some async stuff need to gets finished + // first and then the validator will re-trigger the validation. + result.shouldChangeDisplay = false; } else { $elem.trigger('validation', true); result.shouldChangeDisplay = true; } // Run element validation callback - if (typeof conf.onElementValidate === 'function' && validationErrorMsg !== null) { - conf.onElementValidate(result.isValid, $elem, $form, validationErrorMsg); + if (typeof conf.onElementValidate === 'function' && errorMsg !== null) { + conf.onElementValidate(result.isValid, $elem, $form, errorMsg); } + $elem.trigger('afterValidation', [result, eventContext]); + return result; }, @@ -1074,9 +1574,10 @@ * * @param {String} val * @param {String} dateFormat + * @param {Boolean} [addMissingLeadingZeros] * @return {Array}|{Boolean} */ - parseDate: function (val, dateFormat) { + parseDate: function (val, dateFormat, addMissingLeadingZeros) { var divider = dateFormat.replace(/[a-zA-Z]/gi, '').substring(0, 1), regexp = '^', formatParts = dateFormat.split(divider || null), @@ -1088,6 +1589,17 @@ regexp += '$'; + if (addMissingLeadingZeros) { + var newValueParts = []; + $.each(val.split(divider), function(i, part) { + if(part.length === 1) { + part = '0'+part; + } + newValueParts.push(part); + }); + val = newValueParts.join(divider); + } + matches = val.match(new RegExp(regexp)); if (matches === null) { return false; @@ -1107,8 +1619,8 @@ year = findDateUnit('y', formatParts, matches); if ((month === 2 && day > 28 && (year % 4 !== 0 || year % 100 === 0 && year % 400 !== 0)) || - (month === 2 && day > 29 && (year % 4 === 0 || year % 100 !== 0 && year % 400 === 0)) || - month > 12 || month === 0) { + (month === 2 && day > 29 && (year % 4 === 0 || year % 100 !== 0 && year % 400 === 0)) || + month > 12 || month === 0) { return false; } if ((this.isShortMonth(month) && day > 30) || (!this.isShortMonth(month) && day > 31) || day === 0) { @@ -1122,7 +1634,7 @@ * skum fix. är talet 05 eller lägre ger parseInt rätt int annars får man 0 när man kör parseInt? * * @param {String} val - * @param {Number} + * @return {Number} */ parseDateInt: function (val) { if (val.indexOf('0') === 0) { @@ -1193,8 +1705,8 @@ numericRangeCheck: function (value, rangeAllowed) { // split by dash var range = $.split(rangeAllowed), - // min or max - minmax = parseInt(rangeAllowed.substr(3), 10); + // min or max + minmax = parseInt(rangeAllowed.substr(3), 10); if( range.length === 1 && rangeAllowed.indexOf('min') === -1 && rangeAllowed.indexOf('max') === -1 ) { range = [rangeAllowed, rangeAllowed]; // only a number, checking agains an exact number of characters @@ -1265,7 +1777,7 @@ if (this._numSuggestionElements === 0) { // Re-position suggestion container if window size changes - $window.bind('resize', function () { + $win.bind('resize', function () { $('.jquery-form-suggestions').each(function () { var $container = $(this), suggestID = $container.attr('data-suggest-container'); @@ -1367,6 +1879,7 @@ .click(function () { $input.focus(); $input.val($(this).text()); + $input.trigger('change'); onSelectSuggestion($input); }); }); @@ -1385,6 +1898,7 @@ if ($suggestionContainer.length > 0) { var newText = $suggestionContainer.find('div').eq($.formUtils._selectedSuggestion).text(); $input.val(newText); + $input.trigger('change'); onSelectSuggestion($input); e.preventDefault(); } @@ -1473,6 +1987,8 @@ badInt: 'The input value was not a correct number', badSecurityNumber: 'Your social security number was incorrect', badUKVatAnswer: 'Incorrect UK VAT Number', + badUKNin: 'Incorrect UK NIN', + badUKUtr: 'Incorrect UK UTR Number', badStrength: 'The password isn\'t strong enough', badNumberOfSelectedOptionsStart: 'You have to choose at least ', badNumberOfSelectedOptionsEnd: ' answers', @@ -1495,15 +2011,27 @@ imageRatioNotAccepted : 'Image ratio is not be accepted', badBrazilTelephoneAnswer: 'The phone number entered is invalid', badBrazilCEPAnswer: 'The CEP entered is invalid', - badBrazilCPFAnswer: 'The CPF entered is invalid' + badBrazilCPFAnswer: 'The CPF entered is invalid', + badPlPesel: 'The PESEL entered is invalid', + badPlNip: 'The NIP entered is invalid', + badPlRegon: 'The REGON entered is invalid', + badreCaptcha: 'Please confirm that you are not a bot', + passwordComplexityStart: 'Password must contain at least ', + passwordComplexitySeparator: ', ', + passwordComplexityUppercaseInfo: ' uppercase letter(s)', + passwordComplexityLowercaseInfo: ' lowercase letter(s)', + passwordComplexitySpecialCharsInfo: ' special character(s)', + passwordComplexityNumericCharsInfo: ' numeric character(s)', + passwordComplexityEnd: '.' } - }; - + }); - /* * * * * * * * * * * * * * * * * * * * * * - CORE VALIDATORS - * * * * * * * * * * * * * * * * * * * * */ +})(jQuery, window); +/** + * File declaring all default validators. + */ +(function($) { /* * Validate email @@ -1513,8 +2041,8 @@ validatorFunction: function (email) { var emailParts = email.toLowerCase().split('@'), - localPart = emailParts[0], - domain = emailParts[1]; + localPart = emailParts[0], + domain = emailParts[1]; if (localPart && domain) { @@ -1527,10 +2055,10 @@ } return $.formUtils.validators.validate_domain.validatorFunction(emailParts[1]) && - localPart.indexOf('.') !== 0 && - localPart.substring(localPart.length-1, localPart.length) !== '.' && - localPart.indexOf('..') === -1 && - !(/[^\w\+\.\-\#\-\_\~\!\$\&\'\(\)\*\+\,\;\=\:]/.test(localPart)); + localPart.indexOf('.') !== 0 && + localPart.substring(localPart.length-1, localPart.length) !== '.' && + localPart.indexOf('..') === -1 && + !(/[^\w\+\.\-\#\-\_\~\!\$\&\'\(\)\*\+\,\;\=\:]/.test(localPart)); } return false; @@ -1572,7 +2100,7 @@ }, errorMessage: '', errorMessageKey: function(config) { - if (config.errorMessagePosition === 'top' || config.errorMessagePosition === 'custom') { + if (config.errorMessagePosition === 'top' || typeof config.errorMessagePosition === 'function') { return 'requiredFields'; } else { @@ -1665,7 +2193,20 @@ allowsRange = false, begin, end, steps = $el.valAttr('step') || '', - allowsSteps = false; + allowsSteps = false, + sanitize = $el.attr('data-sanitize') || '', + isFormattedWithNumeral = sanitize.match(/(^|[\s])numberFormat([\s]|$)/i); + + if (isFormattedWithNumeral) { + if (!window.numeral) { + throw new ReferenceError('The data-sanitize value numberFormat cannot be used without the numeral' + + ' library. Please see Data Validation in http://www.formvalidator.net for more information.'); + } + //Unformat input first, then convert back to String + if (val.length) { + val = String(numeral().unformat(val)); + } + } if (allowing.indexOf('number') === -1) { allowing += ',number'; @@ -1692,10 +2233,10 @@ // Fix for checking range with floats using , val = val.replace(',', '.'); } - - if (allowing.indexOf('number') > -1 && val.replace(/[0-9-]/g, '') === '' && (!allowsRange || (val >= begin && val <= end)) && (!allowsSteps || (val % steps === 0))) { + if (val.replace(/[0-9-]/g, '') === '' && (!allowsRange || (val >= begin && val <= end)) && (!allowsSteps || (val % steps === 0))) { return true; } + if (allowing.indexOf('float') > -1 && val.match(new RegExp('^([0-9-]+)\\.([0-9]+)$')) !== null && (!allowsRange || (val >= begin && val <= end)) && (!allowsSteps || (val % steps === 0))) { return true; } @@ -1715,16 +2256,27 @@ var patternStart = '^([a-zA-Z0-9', patternEnd = ']+)$', additionalChars = $el.valAttr('allowing'), - pattern = ''; + pattern = '', + hasSpaces = false; if (additionalChars) { pattern = patternStart + additionalChars + patternEnd; var extra = additionalChars.replace(/\\/g, ''); if (extra.indexOf(' ') > -1) { + hasSpaces = true; extra = extra.replace(' ', ''); extra += language.andSpaces || $.formUtils.LANG.andSpaces; } - this.errorMessage = language.badAlphaNumeric + language.badAlphaNumericExtra + extra; + + if(language.badAlphaNumericAndExtraAndSpaces && language.badAlphaNumericAndExtra) { + if(hasSpaces) { + this.errorMessage = language.badAlphaNumericAndExtraAndSpaces + extra; + } else { + this.errorMessage = language.badAlphaNumericAndExtra + extra + language.badAlphaNumericExtra; + } + } else { + this.errorMessage = language.badAlphaNumeric + language.badAlphaNumericExtra + extra; + } } else { pattern = patternStart + patternEnd; this.errorMessage = language.badAlphaNumeric; @@ -1755,8 +2307,9 @@ $.formUtils.addValidator({ name: 'date', validatorFunction: function (date, $el, conf) { - var dateFormat = $el.valAttr('format') || conf.dateFormat || 'yyyy-mm-dd'; - return $.formUtils.parseDate(date, dateFormat) !== false; + var dateFormat = $el.valAttr('format') || conf.dateFormat || 'yyyy-mm-dd', + addMissingLeadingZeros = $el.valAttr('require-leading-zero') === 'false'; + return $.formUtils.parseDate(date, dateFormat, addMissingLeadingZeros) !== false; }, errorMessage: '', errorMessageKey: 'badDate' @@ -1776,12 +2329,12 @@ validatorFunction: function (val, $el, conf, lang, $form) { // preset return var var isValid = true, - // get name of element. since it is a checkbox group, all checkboxes will have same name + // get name of element. since it is a checkbox group, all checkboxes will have same name elname = $el.attr('name'), - // get checkboxes and count the checked ones + // get checkboxes and count the checked ones $checkBoxes = $('input[type=checkbox][name^="' + elname + '"]', $form), checkedCount = $checkBoxes.filter(':checked').length, - // get el attr that specs qty required / allowed + // get el attr that specs qty required / allowed qtyAllowed = $el.valAttr('qty'); if (qtyAllowed === undefined) { @@ -1801,12 +2354,12 @@ break; // below min qty case 'min': - this.errorMessage = lang.groupCheckedTooFewStart + qtyCheckResults[1] + lang.groupCheckedEnd; + this.errorMessage = lang.groupCheckedTooFewStart + qtyCheckResults[1] + (lang.groupCheckedTooFewEnd || lang.groupCheckedEnd); isValid = false; break; // above max qty case 'max': - this.errorMessage = lang.groupCheckedTooManyStart + qtyCheckResults[1] + lang.groupCheckedEnd; + this.errorMessage = lang.groupCheckedTooManyStart + qtyCheckResults[1] + (lang.groupCheckedTooManyEnd || lang.groupCheckedEnd); isValid = false; break; // ok @@ -1829,3 +2382,6 @@ }); })(jQuery); + + +})); diff --git a/form-validator/jquery.form-validator.min.js b/form-validator/jquery.form-validator.min.js index 4063b49..c950eef 100644 --- a/form-validator/jquery.form-validator.min.js +++ b/form-validator/jquery.form-validator.min.js @@ -1,8 +1,10 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a){"use strict";var b=a(window),c=function(b){if(b.valAttr("error-msg-container"))return a(b.valAttr("error-msg-container"));var c=b.parent();if(!c.hasClass("form-group")&&!c.closest("form").hasClass("form-horizontal")){var d=c.closest(".form-group");if(d.length)return d.eq(0)}return c},d=function(a,b){a.addClass(b.errorElementClass).removeClass("valid"),c(a).addClass(b.inputParentClassOnError).removeClass(b.inputParentClassOnSuccess),""!==b.borderColorOnError&&a.css("border-color",b.borderColorOnError)},e=function(b,d){b.each(function(){var b=a(this);f(b,"",d,d.errorMessagePosition),b.removeClass("valid").removeClass(d.errorElementClass).css("border-color",""),c(b).removeClass(d.inputParentClassOnError).removeClass(d.inputParentClassOnSuccess).find("."+d.errorMessageClass).remove()})},f=function(d,e,f,g){var h=document.getElementById(d.attr("name")+"_err_msg"),i=function(a){b.trigger("validationErrorDisplay",[d,a]),a.html(e)},j={};if(h)i(a(h));else if("object"==typeof g){var k=!1;g.find("."+f.errorMessageClass).each(function(){return this.inputReferer===d[0]?(k=a(this),!1):void 0}),k?e?i(k):k.remove():(j=a('
    '),i(j),j[0].inputReferer=d[0],g.prepend(j))}else{var l=c(d);j=l.find("."+f.errorMessageClass+".help-block"),0===j.length&&(j=a("").addClass("help-block").addClass(f.errorMessageClass),j.appendTo(l)),i(j)}},g=function(b,c,d,e){var f,g=e.errorMessageTemplate.messages.replace(/\{errorTitle\}/g,c),h=[];a.each(d,function(a,b){h.push(e.errorMessageTemplate.field.replace(/\{msg\}/g,b))}),g=g.replace(/\{fields\}/g,h.join("")),f=e.errorMessageTemplate.container.replace(/\{errorMessageClass\}/g,e.errorMessageClass),f=f.replace(/\{messages\}/g,g),b.children().eq(0).before(f)};a.fn.validateOnBlur=function(b,c){return this.find("*[data-validation]").bind("blur.validation",function(){a(this).validateInputOnBlur(b,c,!0,"blur")}),c.validateCheckboxRadioOnClick&&this.find("input[type=checkbox][data-validation],input[type=radio][data-validation]").bind("click.validation",function(){a(this).validateInputOnBlur(b,c,!0,"click")}),this},a.fn.validateOnEvent=function(b,c){return this.find("*[data-validation-event]").each(function(){var d=a(this),e=d.valAttr("event");e&&d.unbind(e+".validation").bind(e+".validation",function(){a(this).validateInputOnBlur(b,c,!0,e)})}),this},a.fn.showHelpOnFocus=function(b){return b||(b="data-validation-help"),this.find(".has-help-txt").valAttr("has-keyup-event",!1).removeClass("has-help-txt"),this.find("textarea,input").each(function(){var c=a(this),d="jquery_form_help_"+(c.attr("name")||"").replace(/(:|\.|\[|\])/g,""),e=c.attr(b);e&&c.addClass("has-help-txt").unbind("focus.help").bind("focus.help",function(){var b=c.parent().find("."+d);0===b.length&&(b=a("").addClass(d).addClass("help").addClass("help-block").text(e).hide(),c.after(b)),b.fadeIn()}).unbind("blur.help").bind("blur.help",function(){a(this).parent().find("."+d).fadeOut("slow")})}),this},a.fn.validate=function(b,c,d){var e=a.extend({},a.formUtils.LANG,d||{});this.each(function(){var d=a(this),f=d.closest("form").get(0).validationConfig||{};d.one("validation",function(a,c){"function"==typeof b&&b(c,this,a)}),d.validateInputOnBlur(e,a.extend({},f,c||{}),!0)})},a.fn.willPostponeValidation=function(){return(this.valAttr("suggestion-nr")||this.valAttr("postpone")||this.hasClass("hasDatepicker"))&&!window.postponedValidation},a.fn.validateInputOnBlur=function(b,g,h,i){if(a.formUtils.eventType=i,this.willPostponeValidation()){var j=this,k=this.valAttr("postpone")||200;return window.postponedValidation=function(){j.validateInputOnBlur(b,g,h,i),window.postponedValidation=!1},setTimeout(function(){window.postponedValidation&&window.postponedValidation()},k),this}b=a.extend({},a.formUtils.LANG,b||{}),e(this,g);var l=this,m=l.closest("form"),n=a.formUtils.validateInput(l,b,g,m,i);return n.isValid?n.shouldChangeDisplay&&(l.addClass("valid"),c(l).addClass(g.inputParentClassOnSuccess)):n.isValid||(d(l,g),f(l,n.errorMsg,g,g.errorMessagePosition),h&&l.unbind("keyup.validation").bind("keyup.validation",function(){a(this).validateInputOnBlur(b,g,!1,"keyup")})),this},a.fn.valAttr=function(a,b){return void 0===b?this.attr("data-validation-"+a):b===!1||null===b?this.removeAttr("data-validation-"+a):(a=a.length>0?"-"+a:"",this.attr("data-validation"+a,b))},a.fn.isValid=function(h,i,j){if(a.formUtils.isLoadingModules){var k=this;return setTimeout(function(){k.isValid(h,i,j)},200),null}i=a.extend({},a.formUtils.defaultConfig(),i||{}),h=a.extend({},a.formUtils.LANG,h||{}),j=j!==!1,a.formUtils.errorDisplayPreventedWhenHalted&&(delete a.formUtils.errorDisplayPreventedWhenHalted,j=!1),a.formUtils.isValidatingEntireForm=!0,a.formUtils.haltValidation=!1;var l=function(b,c){a.inArray(b,n)<0&&n.push(b),o.push(c),c.attr("current-error",b),j&&d(c,i)},m=[],n=[],o=[],p=this,q=function(b,c){return"submit"===c||"button"===c||"reset"===c?!0:a.inArray(b,i.ignore||[])>-1};if(j&&(p.find("."+i.errorMessageClass+".alert").remove(),e(p.find("."+i.errorElementClass+",.valid"),i)),p.find("input,textarea,select").filter(':not([type="submit"],[type="button"])').each(function(){var b=a(this),d=b.attr("type"),e="radio"===d||"checkbox"===d,f=b.attr("name");if(!q(f,d)&&(!e||a.inArray(f,m)<0)){e&&m.push(f);var g=a.formUtils.validateInput(b,h,i,p,"submit");g.shouldChangeDisplay&&(g.isValid?g.isValid&&(b.valAttr("current-error",!1).addClass("valid"),c(b).addClass(i.inputParentClassOnSuccess)):l(g.errorMsg,b))}}),"function"==typeof i.onValidate){var r=i.onValidate(p);a.isArray(r)?a.each(r,function(a,b){l(b.message,b.element)}):r&&r.element&&r.message&&l(r.message,r.element)}return a.formUtils.isValidatingEntireForm=!1,!a.formUtils.haltValidation&&o.length>0?(j&&("top"===i.errorMessagePosition?g(p,h.errorTitle,n,i):"custom"===i.errorMessagePosition?"function"==typeof i.errorMessageCustom&&i.errorMessageCustom(p,h.errorTitle,n,i):a.each(o,function(a,b){f(b,b.attr("current-error"),i,i.errorMessagePosition)}),i.scrollToTopOnError&&b.scrollTop(p.offset().top-20)),!1):(!j&&a.formUtils.haltValidation&&(a.formUtils.errorDisplayPreventedWhenHalted=!0),!a.formUtils.haltValidation)},a.fn.validateForm=function(a,b){return window.console&&"function"==typeof window.console.warn&&window.console.warn("Use of deprecated function $.validateForm, use $.isValid instead"),this.isValid(a,b,!0)},a.fn.restrictLength=function(b){return new a.formUtils.lengthRestriction(this,b),this},a.fn.addSuggestions=function(b){var c=!1;return this.find("input").each(function(){var d=a(this);c=a.split(d.attr("data-suggestions")),c.length>0&&!d.hasClass("has-suggestions")&&(a.formUtils.suggest(d,c,b),d.addClass("has-suggestions"))}),this},a.split=function(b,c){if("function"!=typeof c){if(!b)return[];var d=[];return a.each(b.split(c?c:/[,|\-\s]\s*/g),function(b,c){c=a.trim(c),c.length&&d.push(c)}),d}b&&a.each(b.split(/[,|\-\s]\s*/g),function(b,d){return d=a.trim(d),d.length?c(d,b):void 0})},a.validate=function(c){var d=a.extend(a.formUtils.defaultConfig(),{form:"form",validateOnEvent:!1,validateOnBlur:!0,validateCheckboxRadioOnClick:!0,showHelpOnFocus:!0,addSuggestions:!0,modules:"",onModulesLoaded:null,language:!1,onSuccess:!1,onError:!1,onElementValidate:!1});if(c=a.extend(d,c||{}),c.lang&&"en"!==c.lang){var f="lang/"+c.lang+".js";c.modules+=c.modules.length?","+f:f}a(c.form).each(function(d,f){f.validationConfig=c;var g=a(f);b.trigger("formValidationSetup",[g,c]),g.find(".has-help-txt").unbind("focus.validation").unbind("blur.validation"),g.removeClass("has-validation-callback").unbind("submit.validation").unbind("reset.validation").find("input[data-validation],textarea[data-validation]").unbind("blur.validation"),g.bind("submit.validation",function(){var b=a(this);if(a.formUtils.haltValidation)return!1;if(a.formUtils.isLoadingModules)return setTimeout(function(){b.trigger("submit.validation")},200),!1;var d=b.isValid(c.language,c);if(a.formUtils.haltValidation)return!1;if(!d||"function"!=typeof c.onSuccess)return d||"function"!=typeof c.onError?d:(c.onError(b),!1);var e=c.onSuccess(b);return e===!1?!1:void 0}).bind("reset.validation",function(){a(this).find("."+c.errorMessageClass+".alert").remove(),e(a(this).find("."+c.errorElementClass+",.valid"),c)}).addClass("has-validation-callback"),c.showHelpOnFocus&&g.showHelpOnFocus(),c.addSuggestions&&g.addSuggestions(),c.validateOnBlur&&(g.validateOnBlur(c.language,c),g.bind("html5ValidationAttrsFound",function(){g.validateOnBlur(c.language,c)})),c.validateOnEvent&&g.validateOnEvent(c.language,c)}),""!==c.modules&&a.formUtils.loadModules(c.modules,!1,function(){"function"==typeof c.onModulesLoaded&&c.onModulesLoaded(),b.trigger("validatorsLoaded",["string"==typeof c.form?a(c.form):c.form,c])})},a.formUtils={defaultConfig:function(){return{ignore:[],errorElementClass:"error",borderColorOnError:"#b94a48",errorMessageClass:"form-error",validationRuleAttribute:"data-validation",validationErrorMsgAttribute:"data-validation-error-msg",errorMessagePosition:"element",errorMessageTemplate:{container:'
    {messages}
    ',messages:"{errorTitle}
      {fields}
    ",field:"
  • {msg}
  • "},errorMessageCustom:g,scrollToTopOnError:!0,dateFormat:"yyyy-mm-dd",addValidClassOnAll:!1,decimalSeparator:".",inputParentClassOnError:"has-error",inputParentClassOnSuccess:"has-success",validateHiddenInputs:!1}},validators:{},_events:{load:[],valid:[],invalid:[]},haltValidation:!1,isValidatingEntireForm:!1,addValidator:function(a){var b=0===a.name.indexOf("validate_")?a.name:"validate_"+a.name;void 0===a.validateOnKeyUp&&(a.validateOnKeyUp=!0),this.validators[b]=a},isLoadingModules:!1,loadedModules:{},loadModules:function(c,d,e){if(void 0===e&&(e=!0),a.formUtils.isLoadingModules)return void setTimeout(function(){a.formUtils.loadModules(c,d,e)});var f=!1,g=function(c,d){var g=a.split(c),h=g.length,i=function(){h--,0===h&&(a.formUtils.isLoadingModules=!1,e&&f&&("function"==typeof e?e():b.trigger("validatorsLoaded")))};h>0&&(a.formUtils.isLoadingModules=!0);var j="?_="+(new Date).getTime(),k=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];a.each(g,function(b,c){if(c=a.trim(c),0===c.length)i();else{var e=d+c+(".js"===c.slice(-3)?"":".js"),g=document.createElement("SCRIPT");e in a.formUtils.loadedModules?i():(a.formUtils.loadedModules[e]=1,f=!0,g.type="text/javascript",g.onload=i,g.src=e+(".dev.js"===e.slice(-7)?j:""),g.onerror=function(){"console"in window&&window.console.log&&window.console.log("Unable to load form validation module "+e)},g.onreadystatechange=function(){("complete"===this.readyState||"loaded"===this.readyState)&&(i(),this.onload=null,this.onreadystatechange=null)},k.appendChild(g))}})};if(d)g(c,d);else{var h=function(){var b=!1;return a('script[src*="form-validator"]').each(function(){return b=this.src.substr(0,this.src.lastIndexOf("/"))+"/","/"===b&&(b=""),!1}),b!==!1?(g(c,b),!0):!1};h()||a(h)}},validateInput:function(b,c,d,e,f){b.trigger("beforeValidation"),d=d||a.formUtils.defaultConfig(),c=c||a.formUtils.LANG;var g=b.val()||"",h={isValid:!0,shouldChangeDisplay:!0,errorMsg:""},i=b.valAttr("optional"),j=!1,k=!1,l=!1,m=b.valAttr("if-checked"),n=b.valAttr("if-checked-value");if(b.attr("disabled")||!b.is(":visible")&&!d.validateHiddenInputs)return h.shouldChangeDisplay=!1,h;null!=m&&(j=!0,l=e.find('input[name="'+m+'"]'),null!=n?l.each(function(b,c){a(c).prop("checked")&&a(c).val()===n&&(k=!0)}):l.prop("checked")&&(k=!0));var o=!g&&"number"===b[0].type;if(!g&&"true"===i&&!o||j&&!k)return h.shouldChangeDisplay=d.addValidClassOnAll,h;var p=b.attr(d.validationRuleAttribute),q=!0;return p?(a.split(p,function(h){0!==h.indexOf("validate_")&&(h="validate_"+h);var i=a.formUtils.validators[h];if(!i||"function"!=typeof i.validatorFunction)throw new Error('Using undefined validator "'+h+'"');"validate_checkbox_group"===h&&(b=e.find('[name="'+b.attr("name")+'"]:eq(0)'));var j=null;return("keyup"!==f||i.validateOnKeyUp)&&(j=i.validatorFunction(g,b,d,c,e)),j?void 0:(q=null,null!==j&&(q=b.attr(d.validationErrorMsgAttribute+"-"+h.replace("validate_","")),q||(q=b.attr(d.validationErrorMsgAttribute),q||(q=c[i.errorMessageKey],q||(q=i.errorMessage)))),!1)}," "),"string"==typeof q?(b.trigger("validation",!1),h.errorMsg=q,h.isValid=!1,h.shouldChangeDisplay=!0):null===q?h.shouldChangeDisplay=d.addValidClassOnAll:(b.trigger("validation",!0),h.shouldChangeDisplay=!0),"function"==typeof d.onElementValidate&&null!==q&&d.onElementValidate(h.isValid,b,e,q),h):(h.shouldChangeDisplay=d.addValidClassOnAll,h)},parseDate:function(b,c){var d,e,f,g,h=c.replace(/[a-zA-Z]/gi,"").substring(0,1),i="^",j=c.split(h||null);if(a.each(j,function(a,b){i+=(a>0?"\\"+h:"")+"(\\d{"+b.length+"})"}),i+="$",d=b.match(new RegExp(i)),null===d)return!1;var k=function(b,c,d){for(var e=0;e28&&(g%4!==0||g%100===0&&g%400!==0)||2===f&&e>29&&(g%4===0||g%100!==0&&g%400===0)||f>12||0===f?!1:this.isShortMonth(f)&&e>30||!this.isShortMonth(f)&&e>31||0===e?!1:[g,f,e]},parseDateInt:function(a){return 0===a.indexOf("0")&&(a=a.replace("0","")),parseInt(a,10)},isShortMonth:function(a){return a%2===0&&7>a||a%2!==0&&a>7},lengthRestriction:function(b,c){var d=parseInt(c.text(),10),e=0,f=function(){var a=b.val().length;if(a>d){var f=b.scrollTop();b.val(b.val().substring(0,d)),b.scrollTop(f)}e=d-a,0>e&&(e=0),c.text(e)};a(b).bind("keydown keyup keypress focus blur",f).bind("cut paste",function(){setTimeout(f,100)}),a(document).bind("ready",f)},numericRangeCheck:function(b,c){var d=a.split(c),e=parseInt(c.substr(3),10);return 1===d.length&&-1===c.indexOf("min")&&-1===c.indexOf("max")&&(d=[c,c]),2===d.length&&(bparseInt(d[1],10))?["out",d[0],d[1]]:0===c.indexOf("min")&&e>b?["min",e]:0===c.indexOf("max")&&b>e?["max",e]:["ok"]},_numSuggestionElements:0,_selectedSuggestion:null,_previousTypedVal:null,suggest:function(c,d,e){var f={css:{maxHeight:"150px",background:"#FFF",lineHeight:"150%",textDecoration:"underline",overflowX:"hidden",overflowY:"auto",border:"#CCC solid 1px",borderTop:"none",cursor:"pointer"},activeSuggestionCSS:{background:"#E9E9E9"}},g=function(a,b){var c=b.offset();a.css({width:b.outerWidth(),left:c.left+"px",top:c.top+b.outerHeight()+"px"})};e&&a.extend(f,e),f.css.position="absolute",f.css["z-index"]=9999,c.attr("autocomplete","off"),0===this._numSuggestionElements&&b.bind("resize",function(){a(".jquery-form-suggestions").each(function(){var b=a(this),c=b.attr("data-suggest-container");g(b,a(".suggestions-"+c).eq(0))})}),this._numSuggestionElements++;var h=function(b){var c=b.valAttr("suggestion-nr");a.formUtils._selectedSuggestion=null,a.formUtils._previousTypedVal=null,a(".jquery-form-suggestion-"+c).fadeOut("fast")};return c.data("suggestions",d).valAttr("suggestion-nr",this._numSuggestionElements).unbind("focus.suggest").bind("focus.suggest",function(){a(this).trigger("keyup"),a.formUtils._selectedSuggestion=null}).unbind("keyup.suggest").bind("keyup.suggest",function(){var b=a(this),d=[],e=a.trim(b.val()).toLocaleLowerCase();if(e!==a.formUtils._previousTypedVal){a.formUtils._previousTypedVal=e;var i=!1,j=b.valAttr("suggestion-nr"),k=a(".jquery-form-suggestion-"+j);if(k.scrollTop(0),""!==e){var l=e.length>2;a.each(b.data("suggestions"),function(a,b){var c=b.toLocaleLowerCase();return c===e?(d.push(""+b+""),i=!0,!1):void((0===c.indexOf(e)||l&&c.indexOf(e)>-1)&&d.push(b.replace(new RegExp(e,"gi"),"$&")))})}i||0===d.length&&k.length>0?k.hide():d.length>0&&0===k.length?(k=a("
    ").css(f.css).appendTo("body"),c.addClass("suggestions-"+j),k.attr("data-suggest-container",j).addClass("jquery-form-suggestions").addClass("jquery-form-suggestion-"+j)):d.length>0&&!k.is(":visible")&&k.show(),d.length>0&&e.length!==d[0].length&&(g(k,b),k.html(""),a.each(d,function(c,d){a("
    ").append(d).css({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"5px"}).addClass("form-suggest-element").appendTo(k).click(function(){b.focus(),b.val(a(this).text()),h(b)})}))}}).unbind("keydown.validation").bind("keydown.validation",function(b){var c,d,e=b.keyCode?b.keyCode:b.which,g=a(this);if(13===e&&null!==a.formUtils._selectedSuggestion){if(c=g.valAttr("suggestion-nr"),d=a(".jquery-form-suggestion-"+c),d.length>0){var i=d.find("div").eq(a.formUtils._selectedSuggestion).text();g.val(i),h(g),b.preventDefault()}}else{c=g.valAttr("suggestion-nr"),d=a(".jquery-form-suggestion-"+c);var j=d.children();if(j.length>0&&a.inArray(e,[38,40])>-1){38===e?(null===a.formUtils._selectedSuggestion?a.formUtils._selectedSuggestion=j.length-1:a.formUtils._selectedSuggestion--,a.formUtils._selectedSuggestion<0&&(a.formUtils._selectedSuggestion=j.length-1)):40===e&&(null===a.formUtils._selectedSuggestion?a.formUtils._selectedSuggestion=0:a.formUtils._selectedSuggestion++,a.formUtils._selectedSuggestion>j.length-1&&(a.formUtils._selectedSuggestion=0));var k=d.innerHeight(),l=d.scrollTop(),m=d.children().eq(0).outerHeight(),n=m*a.formUtils._selectedSuggestion;return(l>n||n>l+k)&&d.scrollTop(n),j.removeClass("active-suggestion").css("background","none").eq(a.formUtils._selectedSuggestion).addClass("active-suggestion").css(f.activeSuggestionCSS),b.preventDefault(),!1}}}).unbind("blur.suggest").bind("blur.suggest",function(){h(a(this))}),c},LANG:{errorTitle:"Form submission failed!",requiredFields:"You have not answered all required fields",badTime:"You have not given a correct time",badEmail:"You have not given a correct e-mail address",badTelephone:"You have not given a correct phone number",badSecurityAnswer:"You have not given a correct answer to the security question",badDate:"You have not given a correct date",lengthBadStart:"The input value must be between ",lengthBadEnd:" characters",lengthTooLongStart:"The input value is longer than ",lengthTooShortStart:"The input value is shorter than ",notConfirmed:"Input values could not be confirmed",badDomain:"Incorrect domain value",badUrl:"The input value is not a correct URL",badCustomVal:"The input value is incorrect",andSpaces:" and spaces ",badInt:"The input value was not a correct number",badSecurityNumber:"Your social security number was incorrect",badUKVatAnswer:"Incorrect UK VAT Number",badStrength:"The password isn't strong enough",badNumberOfSelectedOptionsStart:"You have to choose at least ",badNumberOfSelectedOptionsEnd:" answers",badAlphaNumeric:"The input value can only contain alphanumeric characters ",badAlphaNumericExtra:" and ",wrongFileSize:"The file you are trying to upload is too large (max %s)",wrongFileType:"Only files of type %s is allowed",groupCheckedRangeStart:"Please choose between ",groupCheckedTooFewStart:"Please choose at least ",groupCheckedTooManyStart:"Please choose a maximum of ",groupCheckedEnd:" item(s)",badCreditCard:"The credit card number is not correct",badCVV:"The CVV number was not correct",wrongFileDim:"Incorrect image dimensions,",imageTooTall:"the image can not be taller than",imageTooWide:"the image can not be wider than",imageTooSmall:"the image was too small",min:"min",max:"max",imageRatioNotAccepted:"Image ratio is not be accepted",badBrazilTelephoneAnswer:"The phone number entered is invalid",badBrazilCEPAnswer:"The CEP entered is invalid",badBrazilCPFAnswer:"The CPF entered is invalid"}},a.formUtils.addValidator({name:"email",validatorFunction:function(b){var c=b.toLowerCase().split("@"),d=c[0],e=c[1];if(d&&e){if(0===d.indexOf('"')){var f=d.length;if(d=d.replace(/\"/g,""),d.length!==f-2)return!1}return a.formUtils.validators.validate_domain.validatorFunction(c[1])&&0!==d.indexOf(".")&&"."!==d.substring(d.length-1,d.length)&&-1===d.indexOf("..")&&!/[^\w\+\.\-\#\-\_\~\!\$\&\'\(\)\*\+\,\;\=\:]/.test(d)}return!1},errorMessage:"",errorMessageKey:"badEmail"}),a.formUtils.addValidator({name:"domain",validatorFunction:function(a){return a.length>0&&a.length<=253&&!/[^a-zA-Z0-9]/.test(a.slice(-2))&&!/[^a-zA-Z0-9]/.test(a.substr(0,1))&&!/[^a-zA-Z0-9\.\-]/.test(a)&&1===a.split("..").length&&a.split(".").length>1},errorMessage:"",errorMessageKey:"badDomain"}),a.formUtils.addValidator({name:"required",validatorFunction:function(b,c,d,e,f){switch(c.attr("type")){case"checkbox":return c.is(":checked");case"radio":return f.find('input[name="'+c.attr("name")+'"]').filter(":checked").length>0;default:return""!==a.trim(b)}},errorMessage:"",errorMessageKey:"requiredFields"}),a.formUtils.addValidator({name:"length",validatorFunction:function(b,c,d,e){var f=c.valAttr("length"),g=c.attr("type");if(void 0===f)return alert('Please add attribute "data-validation-length" to '+c[0].nodeName+" named "+c.attr("name")),!0;var h,i="file"===g&&void 0!==c.get(0).files?c.get(0).files.length:b.length,j=a.formUtils.numericRangeCheck(i,f);switch(j[0]){case"out":this.errorMessage=e.lengthBadStart+f+e.lengthBadEnd,h=!1;break;case"min":this.errorMessage=e.lengthTooShortStart+j[1]+e.lengthBadEnd,h=!1;break;case"max":this.errorMessage=e.lengthTooLongStart+j[1]+e.lengthBadEnd,h=!1;break;default:h=!0}return h},errorMessage:"",errorMessageKey:""}),a.formUtils.addValidator({name:"url",validatorFunction:function(b){var c=/^(https?|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+,;=]|:|@)|\/|\?)*)?$/i;if(c.test(b)){var d=b.split("://")[1],e=d.indexOf("/");return e>-1&&(d=d.substr(0,e)),a.formUtils.validators.validate_domain.validatorFunction(d)}return!1},errorMessage:"",errorMessageKey:"badUrl"}),a.formUtils.addValidator({name:"number",validatorFunction:function(a,b,c){if(""!==a){var d,e,f=b.valAttr("allowing")||"",g=b.valAttr("decimal-separator")||c.decimalSeparator,h=!1,i=b.valAttr("step")||"",j=!1;if(-1===f.indexOf("number")&&(f+=",number"),-1===f.indexOf("negative")&&0===a.indexOf("-"))return!1;if(f.indexOf("range")>-1&&(d=parseFloat(f.substring(f.indexOf("[")+1,f.indexOf(";"))),e=parseFloat(f.substring(f.indexOf(";")+1,f.indexOf("]"))),h=!0),""!==i&&(j=!0),","===g){if(a.indexOf(".")>-1)return!1;a=a.replace(",",".")}if(f.indexOf("number")>-1&&""===a.replace(/[0-9-]/g,"")&&(!h||a>=d&&e>=a)&&(!j||a%i===0))return!0;if(f.indexOf("float")>-1&&null!==a.match(new RegExp("^([0-9-]+)\\.([0-9]+)$"))&&(!h||a>=d&&e>=a)&&(!j||a%i===0))return!0}return!1},errorMessage:"",errorMessageKey:"badInt"}),a.formUtils.addValidator({name:"alphanumeric",validatorFunction:function(b,c,d,e){var f="^([a-zA-Z0-9",g="]+)$",h=c.valAttr("allowing"),i="";if(h){i=f+h+g;var j=h.replace(/\\/g,"");j.indexOf(" ")>-1&&(j=j.replace(" ",""),j+=e.andSpaces||a.formUtils.LANG.andSpaces),this.errorMessage=e.badAlphaNumeric+e.badAlphaNumericExtra+j}else i=f+g,this.errorMessage=e.badAlphaNumeric;return new RegExp(i).test(b)},errorMessage:"",errorMessageKey:""}),a.formUtils.addValidator({name:"custom",validatorFunction:function(a,b){var c=new RegExp(b.valAttr("regexp"));return c.test(a)},errorMessage:"",errorMessageKey:"badCustomVal"}),a.formUtils.addValidator({name:"date",validatorFunction:function(b,c,d){var e=c.valAttr("format")||d.dateFormat||"yyyy-mm-dd";return a.formUtils.parseDate(b,e)!==!1},errorMessage:"",errorMessageKey:"badDate"}),a.formUtils.addValidator({name:"checkbox_group",validatorFunction:function(b,c,d,e,f){var g=!0,h=c.attr("name"),i=a('input[type=checkbox][name^="'+h+'"]',f),j=i.filter(":checked").length,k=c.valAttr("qty");if(void 0===k){var l=c.get(0).nodeName;alert('Attribute "data-validation-qty" is missing from '+l+" named "+c.attr("name"))}var m=a.formUtils.numericRangeCheck(j,k);switch(m[0]){case"out":this.errorMessage=e.groupCheckedRangeStart+k+e.groupCheckedEnd,g=!1;break;case"min":this.errorMessage=e.groupCheckedTooFewStart+m[1]+e.groupCheckedEnd,g=!1;break;case"max":this.errorMessage=e.groupCheckedTooManyStart+m[1]+e.groupCheckedEnd,g=!1;break;default:g=!0}if(!g){var n=function(){i.unbind("click",n),i.filter("*[data-validation]").validateInputOnBlur(e,d,!1,"blur")};i.bind("click",n)}return g}})}(jQuery); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b,c){function d(a,b){this.$form=a,this.$input=b,this.reset(),b.on("change paste",this.reset.bind(this))}var e=function(){return!1},f=null,g={numHalted:0,haltValidation:function(b){this.numHalted++,a.formUtils.haltValidation=!0,b.unbind("submit",e).bind("submit",e).find('*[type="submit"]').addClass("disabled").attr("disabled","disabled")},unHaltValidation:function(b){this.numHalted--,0===this.numHalted&&(a.formUtils.haltValidation=!1,b.unbind("submit",e).find('*[type="submit"]').removeClass("disabled").removeAttr("disabled","disabled"))}};d.prototype.reset=function(){this.haltedFormValidation=!1,this.hasRun=!1,this.isRunning=!1,this.result=c},d.prototype.run=function(a,b){return"keyup"===a?null:this.isRunning?(f=a,this.haltedFormValidation||(g.haltValidation(),this.haltedFormValidation=!0),null):this.hasRun?this.result:(f=a,g.haltValidation(this.$form),this.haltedFormValidation=!0,this.isRunning=!0,this.$input.attr("disabled","disabled").addClass("async-validation"),this.$form.addClass("async-validation"),b(function(a){this.done(a)}.bind(this)),null)},d.prototype.done=function(a){this.result=a,this.hasRun=!0,this.isRunning=!1,this.$input.removeAttr("disabled").removeClass("async-validation"),this.$form.removeClass("async-validation"),this.haltedFormValidation&&(g.unHaltValidation(this.$form),"submit"===f?this.$form.trigger("submit"):this.$input.trigger("validation.revalidate"))},d.loadInstance=function(a,b,c){var e,f=b.get(0);return f.asyncValidators||(f.asyncValidators={}),f.asyncValidators[a]?e=f.asyncValidators[a]:(e=new d(c,b),f.asyncValidators[a]=e),e},a.formUtils=a.extend(a.formUtils||{},{asyncValidation:function(a,b,c){return this.warn("Use of deprecated function $.formUtils.asyncValidation, use $.formUtils.addAsyncValidator() instead"),d.loadInstance(a,b,c)},addAsyncValidator:function(b){var c=a.extend({},b),e=c.validatorFunction;c.async=!0,c.validatorFunction=function(a,b,f,g,h,i){var j=d.loadInstance(this.name,b,h);return j.run(i,function(d){e.apply(c,[d,a,b,f,g,h,i])})},this.addValidator(c)}}),a(b).bind("validatorsLoaded formValidationSetup",function(b,c){c||(c=a("form")),c.find("[data-validation]").each(function(){var b=a(this);b.valAttr("async",!1),a.each(a.split(b.attr("data-validation")),function(c,d){var e=a.formUtils.validators["validate_"+d];e&&e.async&&b.valAttr("async","yes")})})})}(a,window),function(a,b){"use strict";function c(b){b&&"custom"===b.errorMessagePosition&&"function"==typeof b.errorMessageCustom&&(a.formUtils.warn("Use of deprecated function errorMessageCustom, use config.submitErrorMessageCallback instead"),b.submitErrorMessageCallback=function(a,c){b.errorMessageCustom(a,b.language.errorTitle,c,b)})}function d(b){if(b.errorMessagePosition&&"object"==typeof b.errorMessagePosition){a.formUtils.warn("Deprecated use of config parameter errorMessagePosition, use config.submitErrorMessageCallback instead");var c=b.errorMessagePosition;b.errorMessagePosition="top",b.submitErrorMessageCallback=function(){return c}}}function e(b){var c=b.find("[data-validation-if-checked]");c.length&&a.formUtils.warn('Detected use of attribute "data-validation-if-checked" which is deprecated. Use "data-validation-depends-on" provided by module "logic"'),c.on("beforeValidation",function(){var c=a(this),d=c.valAttr("if-checked"),e=a('input[name="'+d+'"]',b),f=e.is(":checked"),g=(a.formUtils.getValue(e)||"").toString(),h=c.valAttr("if-checked-value");(!f||h&&h!==g)&&c.valAttr("skipped",!0)})}function f(b){var c={se:"sv",cz:"cs",dk:"da"};if(b.lang in c){var d=c[b.lang];a.formUtils.warn('Deprecated use of lang code "'+b.lang+'" use "'+d+'" instead'),b.lang=d}}a.fn.validateForm=function(b,c){return a.formUtils.warn("Use of deprecated function $.validateForm, use $.isValid instead"),this.isValid(b,c,!0)},a(window).on("formValidationPluginInit",function(a,b){f(b),c(b),d(b)}).on("validatorsLoaded formValidationSetup",function(b,c){c||(c=a("form")),e(c)})}(a),function(a){"use strict";var b={resolveErrorMessage:function(a,b,c,d,e){var f=d.validationErrorMsgAttribute+"-"+c.replace("validate_",""),g=a.attr(f);return g||(g=a.attr(d.validationErrorMsgAttribute),g||(g="function"!=typeof b.errorMessageKey?e[b.errorMessageKey]:e[b.errorMessageKey(d)],g||(g=b.errorMessage))),g},getParentContainer:function(b){if(b.valAttr("error-msg-container"))return a(b.valAttr("error-msg-container"));var c=b.parent();return"checkbox"===b.attr("type")&&b.closest(".checkbox").length?c=b.closest(".checkbox").parent():"radio"===b.attr("type")&&b.closest(".radio").length&&(c=b.closest(".radio").parent()),c.closest(".input-group").length&&(c=c.closest(".input-group").parent()),c},applyInputErrorStyling:function(a,b){a.addClass(b.errorElementClass).removeClass(b.successElementClass),this.getParentContainer(a).addClass(b.inputParentClassOnError).removeClass(b.inputParentClassOnSuccess),""!==b.borderColorOnError&&a.css("border-color",b.borderColorOnError)},applyInputSuccessStyling:function(a,b){a.addClass(b.successElementClass),this.getParentContainer(a).addClass(b.inputParentClassOnSuccess)},removeInputStylingAndMessage:function(a,c){a.removeClass(c.successElementClass).removeClass(c.errorElementClass).css("border-color","");var d=b.getParentContainer(a);if(d.removeClass(c.inputParentClassOnError).removeClass(c.inputParentClassOnSuccess),"function"==typeof c.inlineErrorMessageCallback){var e=c.inlineErrorMessageCallback(a,!1,c);e&&e.html("")}else d.find("."+c.errorMessageClass).remove()},removeAllMessagesAndStyling:function(c,d){if("function"==typeof d.submitErrorMessageCallback){var e=d.submitErrorMessageCallback(c,!1,d);e&&e.html("")}else c.find("."+d.errorMessageClass+".alert").remove();c.find("."+d.errorElementClass+",."+d.successElementClass).each(function(){b.removeInputStylingAndMessage(a(this),d)})},setInlineMessage:function(b,c,d){this.applyInputErrorStyling(b,d);var e,f=document.getElementById(b.attr("name")+"_err_msg"),g=!1,h=function(d){a.formUtils.$win.trigger("validationErrorDisplay",[b,d]),d.html(c)},i=function(){var f=!1;g.find("."+d.errorMessageClass).each(function(){if(this.inputReferer===b[0])return f=a(this),!1}),f?c?h(f):f.remove():""!==c&&(e=a('
    '),h(e),e[0].inputReferer=b[0],g.prepend(e))};if(f)a.formUtils.warn("Using deprecated element reference "+f.id),g=a(f),i();else if("function"==typeof d.inlineErrorMessageCallback){if(g=d.inlineErrorMessageCallback(b,c,d),!g)return;i()}else{var j=this.getParentContainer(b);e=j.find("."+d.errorMessageClass+".help-block"),0===e.length&&(e=a("").addClass("help-block").addClass(d.errorMessageClass),e.appendTo(j)),h(e)}},setMessageInTopOfForm:function(b,c,d,e){var f='
    {errorTitle}
      {fields}
    ',g=!1;if("function"!=typeof d.submitErrorMessageCallback||(g=d.submitErrorMessageCallback(b,c,d))){var h={errorTitle:e.errorTitle,fields:"",errorMessageClass:d.errorMessageClass};a.each(c,function(a,b){h.fields+="
  • "+b+"
  • "}),a.each(h,function(a,b){f=f.replace("{"+a+"}",b)}),g?g.html(f):b.children().eq(0).before(a(f))}}};a.formUtils=a.extend(a.formUtils||{},{dialogs:b})}(a),function(a,b,c){"use strict";var d=0;a.fn.validateOnBlur=function(b,c){var d=this,e=this.find("*[data-validation]");return e.each(function(){var e=a(this);if(e.is("[type=radio]")){var f=d.find('[type=radio][name="'+e.attr("name")+'"]');f.bind("blur.validation",function(){e.validateInputOnBlur(b,c,!0,"blur")}),c.validateCheckboxRadioOnClick&&f.bind("click.validation",function(){e.validateInputOnBlur(b,c,!0,"click")})}}),e.bind("blur.validation",function(){a(this).validateInputOnBlur(b,c,!0,"blur")}),c.validateCheckboxRadioOnClick&&this.find("input[type=checkbox][data-validation],input[type=radio][data-validation]").bind("click.validation",function(){a(this).validateInputOnBlur(b,c,!0,"click")}),this},a.fn.validateOnEvent=function(b,c){if(0!==this.length){var d="FORM"===this[0].nodeName?this.find("*[data-validation-event]"):this;return d.each(function(){var d=a(this),e=d.valAttr("event");e&&d.unbind(e+".validation").bind(e+".validation",function(d){9!==(d||{}).keyCode&&a(this).validateInputOnBlur(b,c,!0,e)})}),this}},a.fn.showHelpOnFocus=function(b){return b||(b="data-validation-help"),this.find("textarea,input").each(function(){var c=a(this),e="jquery_form_help_"+ ++d,f=c.attr(b);c.removeClass("has-help-text").unbind("focus.help").unbind("blur.help"),f&&c.addClass("has-help-txt").bind("focus.help",function(){var b=c.parent().find("."+e);0===b.length&&(b=a("").addClass(e).addClass("help").addClass("help-block").text(f).hide(),c.after(b)),b.fadeIn()}).bind("blur.help",function(){a(this).parent().find("."+e).fadeOut("slow")})}),this},a.fn.validate=function(b,c,d){var e=a.extend({},a.formUtils.LANG,d||{});this.each(function(){var d=a(this),f=d.closest("form").get(0)||{},g=f.validationConfig||a.formUtils.defaultConfig();d.one("validation",function(a,c){"function"==typeof b&&b(c,this,a)}),d.validateInputOnBlur(e,a.extend({},g,c||{}),!0)})},a.fn.willPostponeValidation=function(){return(this.valAttr("suggestion-nr")||this.valAttr("postpone")||this.hasClass("hasDatepicker"))&&!b.postponedValidation},a.fn.validateInputOnBlur=function(c,d,e,f){if(a.formUtils.eventType=f,this.willPostponeValidation()){var g=this,h=this.valAttr("postpone")||200;return b.postponedValidation=function(){g.validateInputOnBlur(c,d,e,f),b.postponedValidation=!1},setTimeout(function(){b.postponedValidation&&b.postponedValidation()},h),this}c=a.extend({},a.formUtils.LANG,c||{}),a.formUtils.dialogs.removeInputStylingAndMessage(this,d);var i=this,j=i.closest("form"),k=a.formUtils.validateInput(i,c,d,j,f),l=function(){i.validateInputOnBlur(c,d,!1,"blur.revalidated")};return"blur"===f&&i.unbind("validation.revalidate",l).one("validation.revalidate",l),e&&i.removeKeyUpValidation(),k.shouldChangeDisplay&&(k.isValid?a.formUtils.dialogs.applyInputSuccessStyling(i,d):a.formUtils.dialogs.setInlineMessage(i,k.errorMsg,d)),!k.isValid&&e&&i.validateOnKeyUp(c,d),this},a.fn.validateOnKeyUp=function(b,c){return this.each(function(){var d=a(this);d.valAttr("has-keyup-event")||d.valAttr("has-keyup-event","true").bind("keyup.validation",function(a){9!==a.keyCode&&d.validateInputOnBlur(b,c,!1,"keyup")})}),this},a.fn.removeKeyUpValidation=function(){return this.each(function(){a(this).valAttr("has-keyup-event",!1).unbind("keyup.validation")}),this},a.fn.valAttr=function(a,b){return b===c?this.attr("data-validation-"+a):b===!1||null===b?this.removeAttr("data-validation-"+a):(a=a.length>0?"-"+a:"",this.attr("data-validation"+a,b))},a.fn.isValid=function(b,c,d){if(a.formUtils.isLoadingModules){var e=this;return setTimeout(function(){e.isValid(b,c,d)},200),null}c=a.extend({},a.formUtils.defaultConfig(),c||{}),b=a.extend({},a.formUtils.LANG,b||{}),d=d!==!1,a.formUtils.errorDisplayPreventedWhenHalted&&(delete a.formUtils.errorDisplayPreventedWhenHalted,d=!1);var f=function(b,e){a.inArray(b,h)<0&&h.push(b),i.push(e),e.valAttr("current-error",b),d&&a.formUtils.dialogs.applyInputErrorStyling(e,c)},g=[],h=[],i=[],j=this,k=function(b,d){return"submit"===d||"button"===d||"reset"===d||a.inArray(b,c.ignore||[])>-1};if(d&&a.formUtils.dialogs.removeAllMessagesAndStyling(j,c),j.find("input,textarea,select").filter(':not([type="submit"],[type="button"])').each(function(){var d=a(this),e=d.attr("type"),h="radio"===e||"checkbox"===e,i=d.attr("name");if(!k(i,e)&&(!h||a.inArray(i,g)<0)){h&&g.push(i);var l=a.formUtils.validateInput(d,b,c,j,"submit");l.isValid?l.isValid&&l.shouldChangeDisplay&&(d.valAttr("current-error",!1),a.formUtils.dialogs.applyInputSuccessStyling(d,c)):f(l.errorMsg,d)}}),"function"==typeof c.onValidate){var l=c.onValidate(j);a.isArray(l)?a.each(l,function(a,b){f(b.message,b.element)}):l&&l.element&&l.message&&f(l.message,l.element)}return a.formUtils.isValidatingEntireForm=!1,i.length>0&&d&&("top"===c.errorMessagePosition?a.formUtils.dialogs.setMessageInTopOfForm(j,h,c,b):a.each(i,function(b,d){a.formUtils.dialogs.setInlineMessage(d,d.valAttr("current-error"),c)}),c.scrollToTopOnError&&a.formUtils.$win.scrollTop(j.offset().top-20)),!d&&a.formUtils.haltValidation&&(a.formUtils.errorDisplayPreventedWhenHalted=!0),0===i.length&&!a.formUtils.haltValidation},a.fn.restrictLength=function(b){return new a.formUtils.lengthRestriction(this,b),this},a.fn.addSuggestions=function(b){var c=!1;return this.find("input").each(function(){var d=a(this);c=a.split(d.attr("data-suggestions")),c.length>0&&!d.hasClass("has-suggestions")&&(a.formUtils.suggest(d,c,b),d.addClass("has-suggestions"))}),this}}(a,window),function(a){"use strict";a.formUtils=a.extend(a.formUtils||{},{isLoadingModules:!1,loadedModules:{},registerLoadedModule:function(b){this.loadedModules[a.trim(b).toLowerCase()]=!0},hasLoadedModule:function(b){return a.trim(b).toLowerCase()in this.loadedModules},loadModules:function(b,c,d){if(a.formUtils.isLoadingModules)return void setTimeout(function(){a.formUtils.loadModules(b,c,d)},100);var e=function(b,c){var e=a.split(b),f=e.length,g=function(){f--,0===f&&(a.formUtils.isLoadingModules=!1,"function"==typeof d&&d())};f>0&&(a.formUtils.isLoadingModules=!0);var h="?_="+(new Date).getTime(),i=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];a.each(e,function(b,d){if(d=a.trim(d),0===d.length||a.formUtils.hasLoadedModule(d))g();else{var e=c+d+(".js"===d.slice(-3)?"":".js"),f=document.createElement("SCRIPT");"function"==typeof define&&define.amd?require([e+(".dev.js"===e.slice(-7)?h:"")],g):(f.type="text/javascript",f.onload=g,f.src=e+(".dev.js"===e.slice(-7)?h:""),f.onerror=function(){a.formUtils.warn("Unable to load form validation module "+e,!0),g()},f.onreadystatechange=function(){"complete"!==this.readyState&&"loaded"!==this.readyState||(g(),this.onload=null,this.onreadystatechange=null)},i.appendChild(f))}})};if(c)e(b,c);else{var f=function(){var c=!1;return a('script[src*="form-validator"]').each(function(){var a=this.src.split("form-validator")[1].split("node_modules").length>1;if(!a)return c=this.src.substr(0,this.src.lastIndexOf("/"))+"/","/"===c&&(c=""),!1}),c!==!1&&(e(b,c),!0)};f()||a(function(){var a=f();a||"function"==typeof d&&d()})}}})}(a),function(a){"use strict";a.split=function(b,c,d){d=void 0===d||d===!0;var e="[,|"+(d?"\\s":"")+"-]\\s*",f=new RegExp(e,"g");if("function"!=typeof c){if(!b)return[];var g=[];return a.each(b.split(c?c:f),function(b,c){c=a.trim(c),c.length&&g.push(c)}),g}b&&a.each(b.split(f),function(b,d){if(d=a.trim(d),d.length)return c(d,b)})},a.validate=function(b){var c=a.extend(a.formUtils.defaultConfig(),{form:"form",validateOnEvent:!1,validateOnBlur:!0,validateCheckboxRadioOnClick:!0,showHelpOnFocus:!0,addSuggestions:!0,modules:"",onModulesLoaded:null,language:!1,onSuccess:!1,onError:!1,onElementValidate:!1});if(b=a.extend(c,b||{}),a(window).trigger("formValidationPluginInit",[b]),b.lang&&"en"!==b.lang){var d="lang/"+b.lang+".js";b.modules+=b.modules.length?","+d:d}a(b.form).each(function(c,d){d.validationConfig=b;var e=a(d);e.trigger("formValidationSetup",[e,b]),e.find(".has-help-txt").unbind("focus.validation").unbind("blur.validation"),e.removeClass("has-validation-callback").unbind("submit.validation").unbind("reset.validation").find("input[data-validation],textarea[data-validation]").unbind("blur.validation"),e.bind("submit.validation",function(c){var d=a(this),e=function(){return c.stopImmediatePropagation(),!1};if(a.formUtils.haltValidation)return e();if(a.formUtils.isLoadingModules)return setTimeout(function(){d.trigger("submit.validation")},200),e();var f=d.isValid(b.language,b);if(a.formUtils.haltValidation)return e();if(!f||"function"!=typeof b.onSuccess)return f||"function"!=typeof b.onError?!!f||e():(b.onError(d),e());var g=b.onSuccess(d);return g===!1?e():void 0}).bind("reset.validation",function(){a.formUtils.dialogs.removeAllMessagesAndStyling(e,b)}).addClass("has-validation-callback"),b.showHelpOnFocus&&e.showHelpOnFocus(),b.addSuggestions&&e.addSuggestions(),b.validateOnBlur&&(e.validateOnBlur(b.language,b),e.bind("html5ValidationAttrsFound",function(){e.validateOnBlur(b.language,b)})),b.validateOnEvent&&e.validateOnEvent(b.language,b)}),""!==b.modules&&a.formUtils.loadModules(b.modules,null,function(){"function"==typeof b.onModulesLoaded&&b.onModulesLoaded();var c="string"==typeof b.form?a(b.form):b.form;a.formUtils.$win.trigger("validatorsLoaded",[c,b])})}}(a),function(a,b){"use strict";var c=a(b);a.formUtils=a.extend(a.formUtils||{},{$win:c,defaultConfig:function(){return{ignore:[],errorElementClass:"error",successElementClass:"valid",borderColorOnError:"#b94a48",errorMessageClass:"form-error",validationRuleAttribute:"data-validation",validationErrorMsgAttribute:"data-validation-error-msg",errorMessagePosition:"inline",errorMessageTemplate:{container:'
    {messages}
    ',messages:"{errorTitle}
      {fields}
    ",field:"
  • {msg}
  • "},scrollToTopOnError:!0,dateFormat:"yyyy-mm-dd",addValidClassOnAll:!1,decimalSeparator:".",inputParentClassOnError:"has-error",inputParentClassOnSuccess:"has-success",validateHiddenInputs:!1,inlineErrorMessageCallback:!1,submitErrorMessageCallback:!1}},validators:{},sanitizers:{},_events:{load:[],valid:[],invalid:[]},haltValidation:!1,addValidator:function(a){var b=0===a.name.indexOf("validate_")?a.name:"validate_"+a.name;void 0===a.validateOnKeyUp&&(a.validateOnKeyUp=!0),this.validators[b]=a},addSanitizer:function(a){this.sanitizers[a.name]=a},warn:function(a,c){"console"in b?"function"==typeof b.console.warn?b.console.warn(a):"function"==typeof b.console.log&&b.console.log(a):c&&alert(a)},getValue:function(a,b){var c=b?b.find(a):a;if(c.length>0){var d=c.eq(0).attr("type");return"radio"===d||"checkbox"===d?c.filter(":checked").val()||"":c.val()||""}return!1},validateInput:function(b,c,d,e,f){d=d||a.formUtils.defaultConfig(),c=c||a.formUtils.LANG,e.length||(e=b.parent());var g=this.getValue(b);b.valAttr("skipped",!1).one("beforeValidation",function(){(b.attr("disabled")||!b.is(":visible")&&!d.validateHiddenInputs)&&b.valAttr("skipped",1)}).trigger("beforeValidation",[g,c,d]);var h="true"===b.valAttr("optional"),i=!g&&h,j=b.attr(d.validationRuleAttribute),k=!0,l="",m={isValid:!0,shouldChangeDisplay:!0,errorMsg:""};if(!j||i||b.valAttr("skipped"))return m.shouldChangeDisplay=d.addValidClassOnAll,m;var n=b.valAttr("ignore");return n&&a.each(n.split(""),function(a,b){g=g.replace(new RegExp("\\"+b,"g"),"")}),a.split(j,function(h){0!==h.indexOf("validate_")&&(h="validate_"+h);var i=a.formUtils.validators[h];if(!i)throw new Error('Using undefined validator "'+h+'". Maybe you have forgotten to load the module that "'+h+'" belongs to?');if("validate_checkbox_group"===h&&(b=e.find('[name="'+b.attr("name")+'"]:eq(0)')),("keyup"!==f||i.validateOnKeyUp)&&(k=i.validatorFunction(g,b,d,c,e,f)),!k)return d.validateOnBlur&&b.validateOnKeyUp(c,d),l=a.formUtils.dialogs.resolveErrorMessage(b,i,h,d,c),!1}),k===!1?(b.trigger("validation",!1),m.errorMsg=l,m.isValid=!1,m.shouldChangeDisplay=!0):null===k?m.shouldChangeDisplay=!1:(b.trigger("validation",!0),m.shouldChangeDisplay=!0),"function"==typeof d.onElementValidate&&null!==l&&d.onElementValidate(m.isValid,b,e,l),b.trigger("afterValidation",[m,f]),m},parseDate:function(b,c,d){var e,f,g,h,i=c.replace(/[a-zA-Z]/gi,"").substring(0,1),j="^",k=c.split(i||null);if(a.each(k,function(a,b){j+=(a>0?"\\"+i:"")+"(\\d{"+b.length+"})"}),j+="$",d){var l=[];a.each(b.split(i),function(a,b){1===b.length&&(b="0"+b),l.push(b)}),b=l.join(i)}if(e=b.match(new RegExp(j)),null===e)return!1;var m=function(b,c,d){for(var e=0;e28&&(h%4!==0||h%100===0&&h%400!==0)||2===g&&f>29&&(h%4===0||h%100!==0&&h%400===0)||g>12||0===g)&&(!(this.isShortMonth(g)&&f>30||!this.isShortMonth(g)&&f>31||0===f)&&[h,g,f])},parseDateInt:function(a){return 0===a.indexOf("0")&&(a=a.replace("0","")),parseInt(a,10)},isShortMonth:function(a){return a%2===0&&a<7||a%2!==0&&a>7},lengthRestriction:function(b,c){var d=parseInt(c.text(),10),e=0,f=function(){var a=b.val().length;if(a>d){var f=b.scrollTop();b.val(b.val().substring(0,d)),b.scrollTop(f)}e=d-a,e<0&&(e=0),c.text(e)};a(b).bind("keydown keyup keypress focus blur",f).bind("cut paste",function(){setTimeout(f,100)}),a(document).bind("ready",f)},numericRangeCheck:function(b,c){var d=a.split(c),e=parseInt(c.substr(3),10);return 1===d.length&&c.indexOf("min")===-1&&c.indexOf("max")===-1&&(d=[c,c]),2===d.length&&(bparseInt(d[1],10))?["out",d[0],d[1]]:0===c.indexOf("min")&&be?["max",e]:["ok"]},_numSuggestionElements:0,_selectedSuggestion:null,_previousTypedVal:null,suggest:function(b,d,e){var f={css:{maxHeight:"150px",background:"#FFF",lineHeight:"150%",textDecoration:"underline",overflowX:"hidden",overflowY:"auto",border:"#CCC solid 1px",borderTop:"none",cursor:"pointer"},activeSuggestionCSS:{background:"#E9E9E9"}},g=function(a,b){var c=b.offset();a.css({width:b.outerWidth(),left:c.left+"px",top:c.top+b.outerHeight()+"px"})};e&&a.extend(f,e),f.css.position="absolute",f.css["z-index"]=9999,b.attr("autocomplete","off"),0===this._numSuggestionElements&&c.bind("resize",function(){a(".jquery-form-suggestions").each(function(){var b=a(this),c=b.attr("data-suggest-container");g(b,a(".suggestions-"+c).eq(0))})}),this._numSuggestionElements++;var h=function(b){var c=b.valAttr("suggestion-nr");a.formUtils._selectedSuggestion=null,a.formUtils._previousTypedVal=null,a(".jquery-form-suggestion-"+c).fadeOut("fast")};return b.data("suggestions",d).valAttr("suggestion-nr",this._numSuggestionElements).unbind("focus.suggest").bind("focus.suggest",function(){a(this).trigger("keyup"),a.formUtils._selectedSuggestion=null}).unbind("keyup.suggest").bind("keyup.suggest",function(){var c=a(this),d=[],e=a.trim(c.val()).toLocaleLowerCase();if(e!==a.formUtils._previousTypedVal){a.formUtils._previousTypedVal=e;var i=!1,j=c.valAttr("suggestion-nr"),k=a(".jquery-form-suggestion-"+j);if(k.scrollTop(0),""!==e){var l=e.length>2;a.each(c.data("suggestions"),function(a,b){var c=b.toLocaleLowerCase();return c===e?(d.push(""+b+""),i=!0,!1):void((0===c.indexOf(e)||l&&c.indexOf(e)>-1)&&d.push(b.replace(new RegExp(e,"gi"),"$&")))})}i||0===d.length&&k.length>0?k.hide():d.length>0&&0===k.length?(k=a("
    ").css(f.css).appendTo("body"),b.addClass("suggestions-"+j),k.attr("data-suggest-container",j).addClass("jquery-form-suggestions").addClass("jquery-form-suggestion-"+j)):d.length>0&&!k.is(":visible")&&k.show(),d.length>0&&e.length!==d[0].length&&(g(k,c),k.html(""),a.each(d,function(b,d){a("
    ").append(d).css({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"5px"}).addClass("form-suggest-element").appendTo(k).click(function(){c.focus(),c.val(a(this).text()),c.trigger("change"),h(c)})}))}}).unbind("keydown.validation").bind("keydown.validation",function(b){var c,d,e=b.keyCode?b.keyCode:b.which,g=a(this);if(13===e&&null!==a.formUtils._selectedSuggestion){if(c=g.valAttr("suggestion-nr"),d=a(".jquery-form-suggestion-"+c),d.length>0){var i=d.find("div").eq(a.formUtils._selectedSuggestion).text();g.val(i),g.trigger("change"),h(g),b.preventDefault()}}else{c=g.valAttr("suggestion-nr"),d=a(".jquery-form-suggestion-"+c);var j=d.children();if(j.length>0&&a.inArray(e,[38,40])>-1){38===e?(null===a.formUtils._selectedSuggestion?a.formUtils._selectedSuggestion=j.length-1:a.formUtils._selectedSuggestion--,a.formUtils._selectedSuggestion<0&&(a.formUtils._selectedSuggestion=j.length-1)):40===e&&(null===a.formUtils._selectedSuggestion?a.formUtils._selectedSuggestion=0:a.formUtils._selectedSuggestion++,a.formUtils._selectedSuggestion>j.length-1&&(a.formUtils._selectedSuggestion=0));var k=d.innerHeight(),l=d.scrollTop(),m=d.children().eq(0).outerHeight(),n=m*a.formUtils._selectedSuggestion;return(nl+k)&&d.scrollTop(n),j.removeClass("active-suggestion").css("background","none").eq(a.formUtils._selectedSuggestion).addClass("active-suggestion").css(f.activeSuggestionCSS),b.preventDefault(),!1}}}).unbind("blur.suggest").bind("blur.suggest",function(){h(a(this))}),b},LANG:{errorTitle:"Form submission failed!",requiredField:"This is a required field",requiredFields:"You have not answered all required fields",badTime:"You have not given a correct time",badEmail:"You have not given a correct e-mail address",badTelephone:"You have not given a correct phone number",badSecurityAnswer:"You have not given a correct answer to the security question",badDate:"You have not given a correct date",lengthBadStart:"The input value must be between ",lengthBadEnd:" characters",lengthTooLongStart:"The input value is longer than ",lengthTooShortStart:"The input value is shorter than ",notConfirmed:"Input values could not be confirmed",badDomain:"Incorrect domain value",badUrl:"The input value is not a correct URL",badCustomVal:"The input value is incorrect",andSpaces:" and spaces ",badInt:"The input value was not a correct number",badSecurityNumber:"Your social security number was incorrect",badUKVatAnswer:"Incorrect UK VAT Number",badUKNin:"Incorrect UK NIN",badUKUtr:"Incorrect UK UTR Number",badStrength:"The password isn't strong enough",badNumberOfSelectedOptionsStart:"You have to choose at least ",badNumberOfSelectedOptionsEnd:" answers",badAlphaNumeric:"The input value can only contain alphanumeric characters ",badAlphaNumericExtra:" and ",wrongFileSize:"The file you are trying to upload is too large (max %s)",wrongFileType:"Only files of type %s is allowed",groupCheckedRangeStart:"Please choose between ",groupCheckedTooFewStart:"Please choose at least ",groupCheckedTooManyStart:"Please choose a maximum of ",groupCheckedEnd:" item(s)",badCreditCard:"The credit card number is not correct",badCVV:"The CVV number was not correct",wrongFileDim:"Incorrect image dimensions,",imageTooTall:"the image can not be taller than",imageTooWide:"the image can not be wider than",imageTooSmall:"the image was too small",min:"min",max:"max",imageRatioNotAccepted:"Image ratio is not be accepted",badBrazilTelephoneAnswer:"The phone number entered is invalid",badBrazilCEPAnswer:"The CEP entered is invalid",badBrazilCPFAnswer:"The CPF entered is invalid",badPlPesel:"The PESEL entered is invalid",badPlNip:"The NIP entered is invalid",badPlRegon:"The REGON entered is invalid",badreCaptcha:"Please confirm that you are not a bot",passwordComplexityStart:"Password must contain at least ",passwordComplexitySeparator:", ",passwordComplexityUppercaseInfo:" uppercase letter(s)",passwordComplexityLowercaseInfo:" lowercase letter(s)",passwordComplexitySpecialCharsInfo:" special character(s)",passwordComplexityNumericCharsInfo:" numeric character(s)",passwordComplexityEnd:"."}})}(a,window),function(a){a.formUtils.addValidator({name:"email",validatorFunction:function(b){var c=b.toLowerCase().split("@"),d=c[0],e=c[1];if(d&&e){if(0===d.indexOf('"')){var f=d.length;if(d=d.replace(/\"/g,""),d.length!==f-2)return!1}return a.formUtils.validators.validate_domain.validatorFunction(c[1])&&0!==d.indexOf(".")&&"."!==d.substring(d.length-1,d.length)&&d.indexOf("..")===-1&&!/[^\w\+\.\-\#\-\_\~\!\$\&\'\(\)\*\+\,\;\=\:]/.test(d)}return!1},errorMessage:"",errorMessageKey:"badEmail"}),a.formUtils.addValidator({name:"domain",validatorFunction:function(a){return a.length>0&&a.length<=253&&!/[^a-zA-Z0-9]/.test(a.slice(-2))&&!/[^a-zA-Z0-9]/.test(a.substr(0,1))&&!/[^a-zA-Z0-9\.\-]/.test(a)&&1===a.split("..").length&&a.split(".").length>1},errorMessage:"",errorMessageKey:"badDomain"}),a.formUtils.addValidator({name:"required",validatorFunction:function(b,c,d,e,f){switch(c.attr("type")){case"checkbox":return c.is(":checked");case"radio":return f.find('input[name="'+c.attr("name")+'"]').filter(":checked").length>0;default:return""!==a.trim(b)}},errorMessage:"",errorMessageKey:function(a){return"top"===a.errorMessagePosition||"function"==typeof a.errorMessagePosition?"requiredFields":"requiredField"}}),a.formUtils.addValidator({name:"length",validatorFunction:function(b,c,d,e){var f=c.valAttr("length"),g=c.attr("type");if(void 0===f)return alert('Please add attribute "data-validation-length" to '+c[0].nodeName+" named "+c.attr("name")),!0;var h,i="file"===g&&void 0!==c.get(0).files?c.get(0).files.length:b.length,j=a.formUtils.numericRangeCheck(i,f);switch(j[0]){case"out":this.errorMessage=e.lengthBadStart+f+e.lengthBadEnd,h=!1;break;case"min":this.errorMessage=e.lengthTooShortStart+j[1]+e.lengthBadEnd,h=!1;break;case"max":this.errorMessage=e.lengthTooLongStart+j[1]+e.lengthBadEnd,h=!1;break;default:h=!0}return h},errorMessage:"",errorMessageKey:""}),a.formUtils.addValidator({name:"url",validatorFunction:function(b){var c=/^(https?|ftp):\/\/((((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|\[|\]|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;if(c.test(b)){var d=b.split("://")[1],e=d.indexOf("/");return e>-1&&(d=d.substr(0,e)),a.formUtils.validators.validate_domain.validatorFunction(d)}return!1},errorMessage:"",errorMessageKey:"badUrl"}),a.formUtils.addValidator({name:"number",validatorFunction:function(a,b,c){if(""!==a){var d,e,f=b.valAttr("allowing")||"",g=b.valAttr("decimal-separator")||c.decimalSeparator,h=!1,i=b.valAttr("step")||"",j=!1,k=b.attr("data-sanitize")||"",l=k.match(/(^|[\s])numberFormat([\s]|$)/i);if(l){if(!window.numeral)throw new ReferenceError("The data-sanitize value numberFormat cannot be used without the numeral library. Please see Data Validation in http://www.formvalidator.net for more information.");a.length&&(a=String(numeral().unformat(a)))}if(f.indexOf("number")===-1&&(f+=",number"),f.indexOf("negative")===-1&&0===a.indexOf("-"))return!1;if(f.indexOf("range")>-1&&(d=parseFloat(f.substring(f.indexOf("[")+1,f.indexOf(";"))),e=parseFloat(f.substring(f.indexOf(";")+1,f.indexOf("]"))),h=!0),""!==i&&(j=!0),","===g){if(a.indexOf(".")>-1)return!1;a=a.replace(",",".")}if(""===a.replace(/[0-9-]/g,"")&&(!h||a>=d&&a<=e)&&(!j||a%i===0))return!0;if(f.indexOf("float")>-1&&null!==a.match(new RegExp("^([0-9-]+)\\.([0-9]+)$"))&&(!h||a>=d&&a<=e)&&(!j||a%i===0))return!0}return!1},errorMessage:"",errorMessageKey:"badInt"}),a.formUtils.addValidator({name:"alphanumeric",validatorFunction:function(b,c,d,e){var f="^([a-zA-Z0-9",g="]+)$",h=c.valAttr("allowing"),i="",j=!1;if(h){i=f+h+g;var k=h.replace(/\\/g,"");k.indexOf(" ")>-1&&(j=!0,k=k.replace(" ",""),k+=e.andSpaces||a.formUtils.LANG.andSpaces),e.badAlphaNumericAndExtraAndSpaces&&e.badAlphaNumericAndExtra?j?this.errorMessage=e.badAlphaNumericAndExtraAndSpaces+k:this.errorMessage=e.badAlphaNumericAndExtra+k+e.badAlphaNumericExtra:this.errorMessage=e.badAlphaNumeric+e.badAlphaNumericExtra+k; +}else i=f+g,this.errorMessage=e.badAlphaNumeric;return new RegExp(i).test(b)},errorMessage:"",errorMessageKey:""}),a.formUtils.addValidator({name:"custom",validatorFunction:function(a,b){var c=new RegExp(b.valAttr("regexp"));return c.test(a)},errorMessage:"",errorMessageKey:"badCustomVal"}),a.formUtils.addValidator({name:"date",validatorFunction:function(b,c,d){var e=c.valAttr("format")||d.dateFormat||"yyyy-mm-dd",f="false"===c.valAttr("require-leading-zero");return a.formUtils.parseDate(b,e,f)!==!1},errorMessage:"",errorMessageKey:"badDate"}),a.formUtils.addValidator({name:"checkbox_group",validatorFunction:function(b,c,d,e,f){var g=!0,h=c.attr("name"),i=a('input[type=checkbox][name^="'+h+'"]',f),j=i.filter(":checked").length,k=c.valAttr("qty");if(void 0===k){var l=c.get(0).nodeName;alert('Attribute "data-validation-qty" is missing from '+l+" named "+c.attr("name"))}var m=a.formUtils.numericRangeCheck(j,k);switch(m[0]){case"out":this.errorMessage=e.groupCheckedRangeStart+k+e.groupCheckedEnd,g=!1;break;case"min":this.errorMessage=e.groupCheckedTooFewStart+m[1]+(e.groupCheckedTooFewEnd||e.groupCheckedEnd),g=!1;break;case"max":this.errorMessage=e.groupCheckedTooManyStart+m[1]+(e.groupCheckedTooManyEnd||e.groupCheckedEnd),g=!1;break;default:g=!0}if(!g){var n=function(){i.unbind("click",n),i.filter("*[data-validation]").validateInputOnBlur(e,d,!1,"blur")};i.bind("click",n)}return g}})}(a)}); \ No newline at end of file diff --git a/form-validator/jsconf.js b/form-validator/jsconf.js index 7fe993c..1499923 100644 --- a/form-validator/jsconf.js +++ b/form-validator/jsconf.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a){"use strict";a.setupValidation=function(b){var c=a(b.form||"form");a.each(b.validate||b.validation||{},function(b,d){var e;e="#"===b[0]?a(b):c.find("."===b[0]?b:'*[name="'+b+'"]'),e.attr("data-validation",d.validation),a.each(d,function(a,b){"validation"!==a&&b!==!1&&(b===!0&&(b="true"),e.valAttr(a,b))})}),a.validate(b)}}(jQuery); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){"use strict";a.formUtils.registerLoadedModule("jsconf"),a.setupValidation=function(b){var c=a(b.form||"form");a.each(b.validate||b.validation||{},function(b,d){var e;e="#"===b[0]?a(b):"."===b[0]?c.find(b):c.find('*[name="'+b+'"]'),e.attr("data-validation",d.validation),a.each(d,function(a,b){"validation"!==a&&b!==!1&&(b===!0&&(b="true"),"_"===a[0]?(a=a.substring(1),b===!1?e.removeAttr(a):e.attr(a,b)):e.valAttr(a,b))})}),a.validate(b)}}(a)}); \ No newline at end of file diff --git a/form-validator/lang/ar.js b/form-validator/lang/ar.js new file mode 100644 index 0000000..8b80062 --- /dev/null +++ b/form-validator/lang/ar.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/ar"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"فَشِلَ إرسال النموذج",requiredField:"هذا الحقل مطلوب",requiredFields:"لم يتم ملأ جميع الحقول المطلوبة.",badTime:"حقل الوقت خاطىء",badEmail:"البريد الإلكتروني المدخل خاطئ",badTelephone:"رقم الهاتف المدخل خاطئ",badSecurityAnswer:"لم يتم الإجابة عن سؤال الأمان",badDate:"تاريخ مدخل خاطئ",lengthBadStart:"القيمة المدخلة يجب أن تكون بين ",lengthBadEnd:" حروف",lengthTooLongStart:"القيمة المدخل أطول من ",lengthTooShortStart:"القيمة المدخل أقصر من ",notConfirmed:"لم يتم تأكيد القيمة المدخلة",badDomain:"قيمة نطاق خاطئة",badUrl:"القيمة المدخلة ليست رابطاً صالحاً",badCustomVal:"القيمة المدخلة غير صالحة",andSpaces:" ومسافات ",badInt:"القيمة المدخلة ليست رقماً صحيحاً",badSecurityNumber:"رقم بطاقة الهوية غير صحيح",badUKVatAnswer:"رقم UK VAT غير صحيح",badUKNin:"غير صحيح UK NINرقم ",badUKUtr:"غير صحيح UK UTR رقم",badStrength:"كلمة المرور غير قوية",badNumberOfSelectedOptionsStart:"يجب اختيار على الأقل ",badNumberOfSelectedOptionsEnd:" أجوبة",badAlphaNumeric:"القيمة المدخلة يجب أن تتضمن حروف وأرقام فقط ",badAlphaNumericExtra:" و ",wrongFileSize:"الملف المراد تحميله كبير جداً (الحد المسموج %s)",wrongFileType:"ملفات من نوع %s فقط مسموحة",groupCheckedRangeStart:"من فضلك اختر بين ",groupCheckedTooFewStart:"من فضلك اختر على الأقل ",groupCheckedTooManyStart:"من فضلك اختر بحد أقصى ",groupCheckedEnd:" مرات",badCreditCard:"رقم بطاقة ائتمانية خاطىء",badCVV:"رمز الأمان خاطئ",wrongFileDim:"حدود الصورة غير صالحة",imageTooTall:"الصورة يمكن أن تكون أطول من",imageTooWide:"الصورة يمكن أن تكون أعرض من",imageTooSmall:"صورة صغيرة جداً",min:"أدنى",max:"أقصى",imageRatioNotAccepted:"أبعاد صورة غير مقبولة",badBrazilTelephoneAnswer:"رقم هاتف مدخل خاطىء",badBrazilCEPAnswer:"قيمة CEP المدخلة غير صحيحة",badBrazilCPFAnswer:"قيمة CPF المدخلة غير صحيحة",badPlPesel:"قيمة Pl PESEL المدخلة غير صحيحة",badPlNip:"قيمة Pl NIP المدخلة غير صحيحة",badPlRegon:"قيمة Pl REGON المدخلة غير صحيحة",badreCaptcha:"من فضلك أكد أنك لست روبوتاً",passwordComplexityStart:"كملة المرور تتكون على الأقل من ",passwordComplexitySeparator:", ",passwordComplexityUppercaseInfo:" حروف كبيرة",passwordComplexityLowercaseInfo:" حروف صغيرة",passwordComplexitySpecialCharsInfo:" رموز خاصة",passwordComplexityNumericCharsInfo:" أرقام",passwordComplexityEnd:"."}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/ca.js b/form-validator/lang/ca.js new file mode 100644 index 0000000..5e92f50 --- /dev/null +++ b/form-validator/lang/ca.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/ca"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"El formulari no s'ha pogut enviar!",requiredField:"Aquest camp és obligatori",requiredFields:"No ha contestat tots els camps requerits",badTime:"L'hora proporcionada no és vàlida",badEmail:"La direcció d'e-mail no és vàlida",badTelephone:"El número de telèfon proporcionat no és vàlid",badSecurityAnswer:"La resposta a la seva pregunta de seguretat és incorrecte",badDate:"La data proporcionada no és vàlida",lengthBadStart:"La seva resposta s'ha d'incloure entre ",lengthBadEnd:" caràcters",lengthTooLongStart:"La seva resposta ha de ser menor a ",lengthTooShortStart:"La seva resposta ha de ser major a ",notConfirmed:"Els valors proporcionats no poden ser confirmats",badDomain:"Ha introduït un domini incorrecte",badUrl:"La URL proporcionada no és vàlida",badCustomVal:"Els valors proporcionats no són vàlids",andSpaces:" i espais ",badInt:"El valor proporcionat no és un número vàlid",badSecurityNumber:"El número de seguretat social proporcionat és incorrecte",badUKVatAnswer:"El número VAT proporcionat no és vàlid pel Regne Unit",badStrength:"La contrasenya proporcionada no és suficientment segura",badNumberOfSelectedOptionsStart:"Ha de seleccionar almenys",badNumberOfSelectedOptionsEnd:" resposta(es)",badAlphaNumeric:"El valor proporcionat només ha de contenir caràcters alfanumèrics (a-z i números)",badAlphaNumericExtra:" i",wrongFileSize:"L'arxiu que està tractant de pujar és massa gran (màx. %s)",wrongFileType:"Només els arxius de tipus %s estan permesos",groupCheckedRangeStart:"Si us plau, triï entre ",groupCheckedTooFewStart:"Si us plau, triï almenys ",groupCheckedTooManyStart:"Si us plau, triï un màxim de ",groupCheckedEnd:" element(s)",badCreditCard:"El número de targeta de crèdit proporcionat no és vàlid",badCVV:"CVV proporcionat no és vàlid",wrongFileDim:"Les dimensions de la imatge no són vàlides,",imageTooTall:"l'alçada de la imatge no pot ser major a",imageTooWide:"l'amplada de la imatge no pot ser major a",imageTooSmall:"la imatge és massa petita",min:"min.",max:"màx.",imageRatioNotAccepted:"La proporció de la imatge (alçada x amplada) no és vàlida"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/cs.js b/form-validator/lang/cs.js new file mode 100644 index 0000000..b6247ce --- /dev/null +++ b/form-validator/lang/cs.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/cs"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Podání formuláře selhalo!",requiredField:"Toto pole je povinné",requiredfields:"Nebyly vyplněny všechny požadované pole",badTime:"Neplatný čas",badEmail:"Neplatná e-mailová adresa",badTelephone:"Neplatné telefonní číslo",badSecurityAnswer:"Chybná odpověď na bezpečnostní otázku",badDate:"Nesprávné datum",lengthBadStart:"Zadaná hodnota musí být v rozmezí ",lengthBadEnd:" znaků",lengthTooLongStart:"Zadaná hodnota je větší než ",lengthTooShortStart:"Zadaná hodnota je menší než ",notConfirmed:"Zadané hodnoty nebyly potvrzené",badDomain:"Neplatná doména",badUrl:"Neplatný URL",badCustomVal:"Zadaná hodnota je chybná",andSpaces:" a mezery",badInt:"Neplatné číslo",badSecurityNumber:"Neplatné číslo zabezpečení",badUKVatAnswer:"Neplatné číslo DIČ ",badStrength:"Vaše heslo není dostatečně silné",badNumberOfSelectedOptionsStart:"Musíte vybrat nejméně ",badNumberOfSelectedOptionsEnd:" odpověď",badAlphaNumeric:"Zadaná hodnota může obsahovat pouze alfanumerické znaky ",badAlphaNumericExtra:" a ",wrongFileSize:"Soubor je příliš velký (max %s)",wrongFileType:"Pouze soubory typu %s",groupCheckedRangeStart:"Prosím, vyberte ",groupCheckedTooFewStart:"Vyberte prosím nejméně ",groupCheckedTooManyStart:"Vyberte prosím maximálně ",groupCheckedEnd:" složka(y)",badCreditCard:"Číslo kreditní karty je neplatné",badCVV:"Číslo CVV je neplatné",wrongFileDim:"Nesprávné rozměry obrázku,",imageTooTall:"obraz nemůže být vyšší než",imageTooWide:"obraz nemůže být širší než",imageTooSmall:"obraz je příliš malý",min:"min",max:"max",imageRatioNotAccepted:"Poměr obrázku je nesprávný",badBrazilTelephoneAnswer:"Neplatné telefonní číslo",badBrazilCEPAnswer:"Neplatné CEP",badBrazilCPFAnswer:"Neplatné CPF"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/cz.js b/form-validator/lang/cz.js deleted file mode 100644 index 6461d53..0000000 --- a/form-validator/lang/cz.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * JQUERY-FORM-VALIDATOR - * - * @website by - * @license MIT - * @version 2.2.83 - */ -!function(a,b){"use strict";a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Podání formuláře selhalo!",requiredfields:"Nebyly vyplněny všechny požadované pole",badTime:"Neplatný čas",badEmail:"Neplatná e-mailová adresa",badTelephone:"Neplatné telefonní číslo",badSecurityAnswer:"Chybná odpověď na bezpečnostní otázku",badDate:"Nesprávné datum",lengthBadStart:"Zadaná hodnota musí být v rozmezí",lengthBadEnd:"znaků",lengthTooLongStart:"Zadaná hodnota je větší než",lengthTooShortStart:"Zadaná hodnota je menší než",notConfirmed:"Zadané hodnoty nebyly potvrzené",badDomain:"Neplatná doména",badUrl:"Neplatný URL",badCustomVal:"Zadaná hodnota je chybná",andSpaces:"a mezery",badInt:"Neplatné číslo",badSecurityNumber:"Neplatné číslo zabezpečení",badUKVatAnswer:"Neplatné číslo DIČ ",badStrength:"Vaše heslo není dostatečně silné",badNumberOfSelectedOptionsStart:"Musíte vybrat nejméně",badNumberOfSelectedOptionsEnd:"odpověď",badAlphaNumeric:"Zadaná hodnota může obsahovat pouze alfanumerické znaky",badAlphaNumericExtra:"a",wrongFileSize:"Soubor je příliš velký (max %s)",wrongFileType:"Pouze soubory typu %s",groupCheckedRangeStart:"Prosím, vyberte",groupCheckedTooFewStart:"Vyberte prosím nejméně",groupCheckedTooManyStart:"Vyberte prosím maximálně",groupCheckedEnd:"složka(y)",badCreditCard:"Číslo kreditní karty je neplatné",badCVV:"Číslo CVV je neplatné",wrongFileDim:"Nesprávné rozměry obrázku,",imageTooTall:"obraz nemůže být vyšší než",imageTooWide:"obraz nemůže být širší než",imageTooSmall:"obraz je příliš malý",min:"min",max:"max",imageRatioNotAccepted:"Poměr obrázku je nesprávný",badBrazilTelephoneAnswer:"Neplatné telefonní číslo",badBrazilCEPAnswer:"Neplatné CEP",badBrazilCPFAnswer:"Neplatné CPF"}})}(jQuery,window); \ No newline at end of file diff --git a/form-validator/lang/da.js b/form-validator/lang/da.js new file mode 100644 index 0000000..f0365b7 --- /dev/null +++ b/form-validator/lang/da.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/da"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={andSpaces:" og mellemrum ",badAlphaNumeric:"Det indtastede kan kun indeholde alfanumeriske karakter ",badAlphaNumericExtra:" og ",badCVV:"Det angivne CVV nummer er ugyldigt",badCreditCard:"Det angivne kortnummer er ugyldigt",badCustomVal:"Den indtastede værdi er ugyldig",badDate:"Den angivne dato er ugyldig",badDomain:"Det angivne domæne er ugyldigt",badEmail:"Den angivne email adresse er ugyldig",badInt:"Det angivne tal er ugyldigt",badNumberOfSelectedOptionsEnd:" svar",badNumberOfSelectedOptionsStart:"Du skal vælge mindst ",badSecurityAnswer:"Du har ikke angivet et korrekt svar til sikkerhedsspørgsmålet",badSecurityNumber:"Dit CPR nummer er ikke korrekt",badStrength:"Det angivne password er ikke stærkt nok",badTelephone:"Det angivne telefonnummer er ugyldigt",badTime:"Det angivne tidspunkt er ugyldigt",badUrl:"Den angivne URL er ugyldig",badreCaptcha:"Verificer venligst at du ikke er en bot",errorTitle:"Formular forespørgslen fejlede!",groupCheckedEnd:" ting",groupCheckedRangeStart:"Vælg venligst mellem ",groupCheckedTooFewStart:"Vælg mindst ",groupCheckedTooManyStart:"Vælg højst ",imageRatioNotAccepted:"Billedets dimensioner er ikke acceptable",imageTooSmall:"Billedet er for lille",imageTooTall:"Billedet må ikke være højere end",imageTooWide:"Billedet må ikke være bredere end",lengthBadEnd:" tegn",lengthBadStart:"Feltets værdi skal være mellem ",lengthTooLongStart:"Feltets værdi må ikke være længere end ",lengthTooShortStart:"Feltets værdi må ikke være kortere end ",max:"max",min:"min",notConfirmed:"Feltværdierne kunne ikke bekræftes",requiredField:"Dette felt er påkrævet",requiredFields:"Du har ikke udfyldt alle påkrævede felter",wrongFileDim:"Forkerte billede dimensioner,",wrongFileSize:"Filen du forsøger at uploade er for stor (max %s)",wrongFileType:"Udelukkende filer at følgedne type er tilladt %s"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/de.js b/form-validator/lang/de.js index df36df0..1196abf 100644 --- a/form-validator/lang/de.js +++ b/form-validator/lang/de.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a,b){"use strict";a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Ihre Anfrage konnte nicht gesendet werden!",requiredFields:"Sie haben nicht alle Fragen beantwortet",badTime:"Sie haben nicht die korrekte Zeit eingegeben",badEmail:"Sie haben keine gültige E-Mail-Adresse eingegeben",badTelephone:"Sie haben keine richtige Telefonnummer eingetragen",badSecurityAnswer:"Sie haben die falsche Antwort auf die Sicherheitsfrage eingegeben",badDate:"Re-Eingabe eines falschen Datums",lengthBadStart:"Ihre Eingabe muss zwischen %s lang sein",lengthBadEnd:" Zeichen",lengthTooLongStart:"Sie haben eine Antwort die länger als %s angegeben",lengthTooShortStart:"Sie haben eine Antwort die kürzer ist als %s eingegebene",notConfirmed:"Die Antworten könnten nicht gegenseitig bestätigen,",badDomain:"Sie haben die falsche Domäne eingetragen",badUrl:"Sie haben nicht die richtige URL eingegeben",badCustomVal:"Re-Eingabe einer falschen Antwort",andSpaces:" und Leerzeichen",badInt:"Sie haben keine Nummer eingegeben",badSecurityNumber:"Sie haben eine falsche Sozialversicherungsnummer eingegeben",badUKVatAnswer:"Sie haben keine UK Umsatzsteuer-Identifikationsnummer eingegeben",badStrength:"Sie haben ein Kennwort, das nicht sicher genug ist eingegeben",badNumberOfSelectedOptionsStart:"Sie müssen mindestens %s wählen",badNumberOfSelectedOptionsEnd:" Antwort",badAlphaNumeric:"Sie können nur mit alphanumerische Zeichen (Buchstaben und Zahlen) eingaben",badAlphaNumericExtra:" und",wrongFileSize:"Die Datei, die Sie hochzuladen versuchen, zu groß ist (max %s)",wrongFileType:"Nur Dateien vom Typ %s sind zulässig",groupCheckedRangeStart:"Wählen Sie zwischen",groupCheckedTooFewStart:"Dann müssen Sie zumindest sicher,",groupCheckedTooManyStart:"Sie können nicht mehr als zu machen",groupCheckedEnd:" Auswahl",badCreditCard:"Sie haben eine ungültige Kreditkartennummer eingegeben",badCVV:"Sie haben eine falsche CVV eingegeben",wrongFileDim:"Illegal Bildgröße,",imageTooTall:"Das Bild kann nicht höher als %s sein",imageTooWide:"Das Bild kann nicht breiter als %s sein",imageTooSmall:"das Bild ist zu klein",min:"min",max:"max",imageRatioNotAccepted:"Bildverhältnis wird nicht akzeptiert"}})}(jQuery,window); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/de"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Ihre Anfrage konnte nicht gesendet werden!",requiredField:"Dies ist ein Pflichtfeld",requiredFields:"Sie haben nicht alle Fragen beantwortet",badTime:"Sie haben nicht die korrekte Zeit eingegeben",badEmail:"Sie haben keine gültige E-Mail-Adresse eingegeben",badTelephone:"Sie haben keine richtige Telefonnummer eingetragen",badSecurityAnswer:"Sie haben die falsche Antwort auf die Sicherheitsfrage eingegeben",badDate:"Eingabe eines falschen Datums",lengthBadStart:"Der eingegebene Wert muss dazwischen sein ",lengthBadEnd:"  Zeichen",lengthTooLongStart:"Der eingegebene Wert ist größer als ",lengthTooShortStart:"Der eingegebene Wert ist kleiner als ",notConfirmed:"Die Eingaben sind unterschiedlich",badDomain:"Sie haben die falsche Domäne eingetragen",badUrl:"Sie haben nicht die richtige URL eingegeben",badCustomVal:"Eingabe einer falschen Antwort",andSpaces:" und Leerzeichen",badInt:"Sie haben keine Nummer eingegeben",badSecurityNumber:"Sie haben eine falsche Sozialversicherungsnummer eingegeben",badUKVatAnswer:"Sie haben keine UK-Umsatzsteuer-Identifikationsnummer eingegeben",badStrength:"Sie haben ein Kennwort, das nicht sicher genug ist eingegeben",badNumberOfSelectedOptionsStart:"Wählen Sie zu mindestens ",badNumberOfSelectedOptionsEnd:" Antwort",badAlphaNumeric:"Sie können nur alphanumerische Zeichen (Buchstaben und Zahlen) eingeben",badAlphaNumericExtra:" und",wrongFileSize:"Die Datei, die Sie hochzuladen versuchen, ist zu groß (max %s)",wrongFileType:"Nur Dateien vom Typ %s sind zulässig",groupCheckedRangeStart:"Wählen Sie zwischen",groupCheckedTooFewStart:"Dann müssen Sie zumindest sicher,",groupCheckedTooManyStart:"Sie können nicht mehr als zu machen",groupCheckedEnd:" Auswahl",badCreditCard:"Sie haben eine ungültige Kreditkartennummer eingegeben",badCVV:"Sie haben eine falsche CVV eingegeben",wrongFileDim:"Illegale Bildgröße,",imageTooTall:"Bild kann nicht größer sein als",imageTooWide:"Bild kann nicht breiter sein als",imageTooSmall:"Bild ist zu klein",min:"min",max:"max",imageRatioNotAccepted:"Bildverhältnis wird nicht akzeptiert",badBrazilTelephoneAnswer:"Die eingegebene Telefonnummer ist nicht korrekt",badBrazilCEPAnswer:"Der CEP ist ungültig",badBrazilCPFAnswer:"Der CEP ist ungültig"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/es.js b/form-validator/lang/es.js index 910025e..ebfa545 100644 --- a/form-validator/lang/es.js +++ b/form-validator/lang/es.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a,b){"use strict";a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"El formulario no se ha podido enviar!",requiredFields:"No ha respondido a todas las preguntas",badTime:"No ha introducido la hora correcta",badEmail:"No ha entrado en una dirección de e-mail válida",badTelephone:"Usted no ha entrado en el número de teléfono correcto",badSecurityAnswer:"Ha introducido la respuesta incorrecta a la pregunta de seguridad",badDate:"Re-escribiendo una fecha incorrecta",lengthBadStart:"Su respuesta debe incluir entre",lengthBadEnd:" signo",lengthTooLongStart:"Ha introducido una respuesta que es más largo que",lengthTooShortStart:"Ha introducido una respuesta que es más corta que",notConfirmed:"Las respuestas no pudieron confirmar entre sí",badDomain:"Ha introducido un dominio incorrecto",badUrl:"Usted no ha entrado en el URL correcto",badCustomVal:"Re-escribiendo una respuesta incorrecta",andSpaces:" y espacios",badInt:"No ha introducido un número",badSecurityNumber:"Ha introducido un número de seguro social incorrecto",badUKVatAnswer:"No ha introducido un número de IVA del Reino Unido",badStrength:"Ha introducido una contraseña que no es lo suficientemente seguro",badNumberOfSelectedOptionsStart:"Debe seleccionar al menos",badNumberOfSelectedOptionsEnd:" respuesta",badAlphaNumeric:"Sólo se puede responder con alfanumersika caracteres (az y números)",badAlphaNumericExtra:" y",wrongFileSize:"El archivo que está tratando de subir es demasiado grande (máx %s)",wrongFileType:"Sólo los archivos de tipo %s está permitido",groupCheckedRangeStart:"Elegir entre",groupCheckedTooFewStart:"Entonces usted debe hacer por lo menos",groupCheckedTooManyStart:"Usted no puede hacer más de",groupCheckedEnd:" selección",badCreditCard:"Ha introducido un número de tarjeta de crédito válida",badCVV:"Usted ha introducido una CVV incorrecta",wrongFileDim:"Tamaño de la imagen Ilegal,",imageTooTall:"el cuadro no puede ser superior a",imageTooWide:"el cuadro no puede ser más amplio que",imageTooSmall:"la imagen es demasiado pequeña",min:"menos",max:"max",imageRatioNotAccepted:"Cociente de la imagen no es ser aceptado"}})}(jQuery,window); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/es"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"El formulario no se ha podido enviar!",requiredField:"Este campo es obligatorio",requiredFields:"No ha contestado todos los campos requeridos",badTime:"La hora proporcionada no es válida",badEmail:"La dirección de e-mail no es válida",badTelephone:"El número de teléfono proporcionado no es válido",badSecurityAnswer:"La respuesta a su pregunta de seguridad es incorrecta",badDate:"La fecha proporcionada no es válida",lengthBadStart:"Su respuesta debe incluir entre ",lengthBadEnd:" caracteres",lengthTooLongStart:"Su respuesta debe de ser menor a ",lengthTooShortStart:"Su respuesta debe de ser mayor a ",notConfirmed:"Los valores proporcionados no pudieron ser confirmados",badDomain:"Ha introducido un dominio incorrecto",badUrl:"La URL proporcionada no es válida",badCustomVal:"Los valores proporcionados no son válidos",andSpaces:" y espacios ",badInt:"El valor proporcionado no es un número válido",badSecurityNumber:"El número de seguridad social proporcionado es incorrecto",badUKVatAnswer:"El número VAT proporcionado no es válido para el Reino Unido",badStrength:"La contraseña proporcionada no es lo suficientemente segura",badNumberOfSelectedOptionsStart:"Debe seleccionar al menos",badNumberOfSelectedOptionsEnd:" respuesta(s)",badAlphaNumeric:"El valor proporcionado solo debe contener caracteres alfanuméricos (a-z y números)",badAlphaNumericExtra:" y",wrongFileSize:"El archivo que está tratando de subir es demasiado grande (máx. %s)",wrongFileType:"Sólo los archivos del tipo %s están permitido",groupCheckedRangeStart:"Por favor, elija entre ",groupCheckedTooFewStart:"Por favor, elija al menos ",groupCheckedTooManyStart:"Por favor, elija un máximo de ",groupCheckedEnd:" ítem(s)",badCreditCard:"El número de tarjeta de crédito proporcionado no es válido",badCVV:"CVV proporcionado no es válido",wrongFileDim:"Las dimensiones de la imagen no son validas,",imageTooTall:"el alto de la imagen no puede ser mayor a",imageTooWide:"el ancho de la imagen no puede ser mayor a",imageTooSmall:"la imagen es demasiado pequeña",min:"min.",max:"máx.",imageRatioNotAccepted:"La proporción de imagen (alto x ancho) no es válida",passwordComplexityStart:"La contraseña debe contener al menos ",passwordComplexitySeparator:", ",passwordComplexityUppercaseInfo:" mayúscula(s)",passwordComplexityLowercaseInfo:" minúscula(s)",passwordComplexitySpecialCharsInfo:" caracter(es) especial(es)",passwordComplexityNumericCharsInfo:" número(s)",passwordComplexityEnd:"."}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/fa.js b/form-validator/lang/fa.js new file mode 100644 index 0000000..e973dd5 --- /dev/null +++ b/form-validator/lang/fa.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/fa"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"ثبت فرم با مشکل مواجه شد!",requiredField:"شما همه فیلدهای ضروری را تکمیل نکرده اید",requiredFields:"شما فیلد ضروری را تکمیل نکرده اید",badTime:"زمان درستی را وارد نکرده اید",badEmail:"آدرس ایمیل را به درستی وارد نکرده اید",badTelephone:"شماره تلفن وارد شده معتبر نیست",badSecurityAnswer:"شما به سوال امنیتی درست پاسخ نداده اید",badDate:"تاریخ درستی را وارد نکرده اید",lengthBadStart:"مقدار وارد شده باید ",lengthBadEnd:" حرف باشد.",lengthTooLongStart:"مقدار ورودی بیشتر از ",lengthTooShortStart:"مقدار ورودی کمتر از ",notConfirmed:"ورودی ها یکسان نیستند",badDomain:"آدرس دامنه به درستی وارد نشده است",badUrl:"آدرس اینترنتی به درستی وارد نشده است",badCustomVal:"مقدار ورودی نادرست است",andSpaces:" و فاصله خالی ",badInt:"مقدار ورودی باید عدد باشد",badSecurityNumber:"شماره امنیت اجتماعی شما معتبر نیست",badUKVatAnswer:"شماره مالیاتی شما درست نیست",badStrength:"کلمه عبور به قدر کافی مستحکم نیست",badNumberOfSelectedOptionsStart:"شما باید حداقل ",badNumberOfSelectedOptionsEnd:" پاسخ را انتخاب کنید",badAlphaNumeric:"مقدار ورودی می تواند حروف و شماره باشد ",badAlphaNumericExtra:" و ",wrongFileSize:"حجم فایل انتخابی زیاد است. (حداکثر %s)",wrongFileType:"فقط فایل های با فرمت %s مجاز هستند",groupCheckedRangeStart:"لطفا بین ",groupCheckedTooFewStart:"لطفا حداقل ",groupCheckedTooManyStart:"لطفا حداکثر ",groupCheckedEnd:" گزینه انتخاب کنید",badCreditCard:"شماره کارت اعتباری معتبر نیست",badCVV:"کد شناسایی سی وی وی معتبر نیست",wrongFileDim:"ابعاد تصویر صحیح نیست,",imageTooTall:"حداکثر طول تصویر",imageTooWide:"حداکثر عرض تصویر",imageTooSmall:"تصویر خیلی کوچک است",min:"حداقل",max:"حداکثر",imageRatioNotAccepted:"نسبت ابعاد تصویر مناسب نیست"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/fr.js b/form-validator/lang/fr.js index 9a252bb..1526584 100644 --- a/form-validator/lang/fr.js +++ b/form-validator/lang/fr.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a,b){"use strict";a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Le formulaire n'a pas pu être envoyé!",requiredFields:"Vous n'avez pas saisi tous les champs",badTime:"Vous n'avez pas saisi l'heure correctement",badEmail:"Vous n'avez pas saisi une adresse e-mail valide",badTelephone:"Vous n'avez pas saisi un numéro de téléphone valide",badSecurityAnswer:"Vous avez saisi une mauvaise réponse à la question de la sécurité",badDate:"Vous n'avez pas saisi une date correcte",lengthBadStart:"Votre saisie doit comporter entre",lengthBadEnd:" caractères",lengthTooLongStart:"Vous avez saisi une réponse qui est plus longue que",lengthTooShortStart:"Votre saisie est plus courte que",notConfirmed:"Les saisies ne sont pas identiques",badDomain:"Vous avez saisi un domaine incorrect",badUrl:"Vous avez saisi une URL incorrecte",badCustomVal:"Re-saisissez une réponse correcte",andSpaces:" et des espaces",badInt:"Vous n'avez pas saisi un numéro",badSecurityNumber:"Vous avez saisi un mauvais numéro de sécurité sociale",badUKVatAnswer:"Vous n'avez pas saisi un numéro de TVA au Royaume-Uni",badStrength:"Vous avez saisi un mot de passe pas assez sécurisé",badNumberOfSelectedOptionsStart:"Vous devez sélectionner au moins",badNumberOfSelectedOptionsEnd:" réponse",badAlphaNumeric:"Vous ne pouvez répondre qu'avec des caractères alphanumériques et des chiffres",badAlphaNumericExtra:" et",wrongFileSize:"Le fichier que vous essayez de télécharger est trop grand (max %s)",wrongFileType:"Seuls les fichiers de type %s sont autorisés",groupCheckedRangeStart:"Choisissez entre",groupCheckedTooFewStart:"Ensuite, vous devez faire au moins",groupCheckedTooManyStart:"Vous ne pouvez pas faire plus de",groupCheckedEnd:" sélection",badCreditCard:"Vous avez saisi un numéro de carte de crédit invalide",badCVV:"Vous avez saisi un CVV incorrecte",wrongFileDim:"Mauvaise taille de l'image,",imageTooTall:"l'image ne peut pas être plus élevée que",imageTooWide:"l'image ne peut pas être plus large que",imageTooSmall:"l'image est trop petite",min:"moins",max:"max",imageRatioNotAccepted:"Ratio de l'image non accepté"}})}(jQuery,window); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/fr"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Le formulaire n'a pas pu être envoyé!",requiredField:"Ce champ est obligatoire",requiredFields:"Vous n'avez pas rempli tous les champs",badTime:"Vous n'avez pas saisi l'heure correctement",badEmail:"Vous n'avez pas saisi une adresse e-mail valide",badTelephone:"Vous n'avez pas saisi un numéro de téléphone valide",badSecurityAnswer:"Vous avez saisi une mauvaise réponse à la question de sécurité",badDate:"Vous n'avez pas saisi une date correcte",lengthBadStart:"Votre saisie doit comporter entre ",lengthBadEnd:" caractères",lengthTooLongStart:"Vous avez saisi une réponse qui est plus longue que ",lengthTooShortStart:"Votre saisie est plus courte que ",notConfirmed:"Les saisies ne sont pas identiques",badDomain:"Vous avez saisi un domaine incorrect",badUrl:"Vous avez saisi une URL incorrecte",badCustomVal:"Re-saisissez une réponse correcte",andSpaces:" et des espaces ",badInt:"Vous n'avez pas saisi un numéro",badSecurityNumber:"Vous avez saisi un mauvais numéro de sécurité sociale",badUKVatAnswer:"Vous n'avez pas saisi un numéro de TVA au Royaume-Uni",badStrength:"Vous avez saisi un mot de passe pas assez sécurisé",badNumberOfSelectedOptionsStart:"Vous devez sélectionner au moins ",badNumberOfSelectedOptionsEnd:" réponse(s)",badAlphaNumeric:"Vous ne pouvez répondre qu'avec des caractères alphanumériques et des chiffres ",badAlphaNumericExtra:" et ",wrongFileSize:"Le fichier que vous essayez de télécharger est trop grand (max %s)",wrongFileType:"Seuls les fichiers du type %s sont autorisés",groupCheckedRangeStart:"Choisissez entre ",groupCheckedTooFewStart:"Vous devez faire au moins ",groupCheckedTooManyStart:"Vous ne pouvez pas faire plus de ",groupCheckedEnd:" sélection(s)",badCreditCard:"Vous avez saisi un numéro de carte de crédit invalide",badCVV:"Vous avez saisi un CVV incorrect",wrongFileDim:"Mauvaise taille de l'image, ",imageTooTall:"l'image ne peut pas être plus élevée que",imageTooWide:"l'image ne peut pas être plus large que",imageTooSmall:"l'image est trop petite",min:"moins",max:"max",imageRatioNotAccepted:"Ratio de l'image non accepté"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/it.js b/form-validator/lang/it.js new file mode 100644 index 0000000..76b83d5 --- /dev/null +++ b/form-validator/lang/it.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/it"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Impossibile inviare il modulo!",requiredField:"Campo obbligatorio",requiredFields:"Non sono stati compilati tutti i campi richiesti",badTime:"L'ora scelta non è valida",badEmail:"Questo indirizzo email non è valido",badTelephone:"Il numero di telefono imputato non è valido",badSecurityAnswer:"La risposta alla domanda di sicurezza è errata",badDate:"La data scelta non è valida",lengthBadStart:"La sua risposta non può essere più lunga di ",lengthBadEnd:" caratteri",lengthTooLongStart:"La lunghezza della risposta deve essere minore di ",lengthTooShortStart:"La lunghezza della risposta deve essere maggiore di ",notConfirmed:"Il valore non è stato confermato.",badDomain:"Il dominio inserito non è corretto.",badUrl:"L' URL inserito non è valido",badCustomVal:"I valori inseriti non sono validi",andSpaces:" e spazi ",badInt:"Il numero inserito non è valido",badSecurityNumber:"Il numero di sicurezza inserito non è valido",badUKVatAnswer:"La Partita IVA (VAT) inserita non è valida nel Regno Unito",badStrength:"La password proposta non è sufficientemente sicura",badNumberOfSelectedOptionsStart:"Deve selezionare almeno",badNumberOfSelectedOptionsEnd:" risposta/e",badAlphaNumeric:"Il valore proposto deve contenere caratteri alfanumerici (a-z e 1234...)",badAlphaNumericExtra:"",wrongFileSize:"Il file che si sta cercando di caricare è troppo grande (massimo %s)",wrongFileType:"Solo i file di tipo %s possono essere inviati",groupCheckedRangeStart:"Si prega di scegliere tra ",groupCheckedTooFewStart:"Si prega di selezionare un minimo di ",groupCheckedTooManyStart:"Si prega di selezionare un massimo di ",groupCheckedEnd:" opzione/i",badCreditCard:"Il numero di carta di credito non risulta valido",badCVV:"CVV non valido",wrongFileDim:"La dimensione dell'immagine non è valida,",imageTooTall:"il lato alto dell'immagine non può essere maggiore di",imageTooWide:"il lato lungo dell'immagine non può essere maggiore di",imageTooSmall:"L'immagine è troppo piccola",min:"min.",max:"máx.",imageRatioNotAccepted:"La proporzione dell' immagine (altezza x larghezza) non è valida"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/ka.js b/form-validator/lang/ka.js new file mode 100644 index 0000000..0d88991 --- /dev/null +++ b/form-validator/lang/ka.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/ka"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"ფორმა ვერ გაიგზავნა!",requiredField:"ველის შევსება სავალდებულოა",requiredFields:"თქვენ არ შეგივსიათ ყველა სავალდებულო ველი",badTime:"თქვენ მიუთითეთ არასწორი დრო",badEmail:"თქვენ მიუთითეთ არასწორი ელ.ფოსტის მისამართი",badTelephone:"თქვენ მიუთითეთ არასწორი ტელეფონის ნომერი",badSecurityAnswer:"თქვენ გაეცით არასწორი პასუხი უსაფრთხოების კითხვას",badDate:"თქვენ მიუთითეთ არასწორი თარიღი",lengthBadStart:"ველის მნიშვნელობის სიგრძე უნდა იყოს ",lengthBadEnd:" შუალედში",lengthTooLongStart:"ველის მნიშვნელობის სიგრძე უნდა იყოს მაქსიმუმ ",lengthTooShortStart:"ველის მნიშვნელობის სიგრძე უნდა იყოს მინიმუმ ",notConfirmed:"ველის მნიშვნელობები ვერ დადასტურდა",badDomain:"არასწორი დომენის მისამართი",badUrl:"ველის მნიშვნელობა არ არის მართებული URL მისამართი",badCustomVal:"ველის მნიშვნელობა არ არის მართებული",andSpaces:" და გამოტოვებები ",badInt:"ველის მნიშვნელობა არ არის მართებული რიცხვი",badStrength:"პაროლი არ არის საკმარისად ძლიერი (კარგი)",badNumberOfSelectedOptionsStart:"თქვენ უნდა აირჩიოთ სულ მცირე ",badNumberOfSelectedOptionsEnd:" პასუხი",badAlphaNumeric:"ველის მნიშვნელობა უნდა შეიცავდეს მხოლოდ ციფრებსა და ასოებს ",badAlphaNumericExtra:" და ",wrongFileSize:"ფაილი, რომლის ატვირთვასაც ცდილობთ არის ძალიან დიდი (დასაშვებია მაქსიმუმ %s)",wrongFileType:"დასაშვებია მხოლოდ შემდეგი გაფართოების ფაილები: %s",groupCheckedRangeStart:"გთხოვთ, აირჩიოთ ",groupCheckedTooFewStart:"გთხოვთ, აირჩიოთ სულ მცირე ",groupCheckedTooManyStart:"გთხოვთ, აირჩიოთ მაქსიმუმ ",groupCheckedEnd:" პუნქტი",badCreditCard:"საკრედიტო ბარათის ნომერი არ არის მართებული",badCVV:"CVV კოდი არ არის მართებული",wrongFileDim:"არამართებული სურათის ზომები,",imageTooTall:"სურათი არ უნდა იყოს უფრო გრძელი ვიდრე",imageTooWide:"სურათი არ უნდა იყოს უფრო ფართე ვიდრე",imageTooSmall:"სურათი არის ძალიან პატარა",min:"მინიმუმ",max:"მაქსიმუმ",imageRatioNotAccepted:"სურათის სიგრძისა და სიგანის ეს თანაფარდობა დაუშვებელია",badBrazilTelephoneAnswer:"მითითებული ტელეფონის ნომერი არ არის მართებული",badreCaptcha:"დაადასტურეთ, რომ არ ხართ რობოტი",passwordComplexityStart:"პაროლი უნდა შეიცავდეს მინიმუმ ",passwordComplexitySeparator:", ",passwordComplexityUppercaseInfo:" დიდი ასო(ები)",passwordComplexityLowercaseInfo:" პატარა ასო(ები)",passwordComplexitySpecialCharsInfo:" სპეციალური სიმბოლო(ები)",passwordComplexityNumericCharsInfo:" რიცხვითი მნიშვნელობა(ები)",passwordComplexityEnd:"."}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/ko.js b/form-validator/lang/ko.js new file mode 100644 index 0000000..7e2c0ea --- /dev/null +++ b/form-validator/lang/ko.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/ko"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"이 양식은 보낼 수 없습니다!",requiredField:"필수 입력란입니다.",requiredFields:"모든 필수 입력란을 입력해야 합니다.",badTime:"시간을 정확하게 입력하지 않았습니다.",badEmail:"e-mail을 정확하게 입력하지 않았습니다.",badTelephone:"전화번호를 정확하게 입력하지 않았습니다.",badSecurityAnswer:"보안 입력을 정확하게 입력하지 않았습니다.",badDate:"날짜를 정확하게 입력하지 않았습니다.",lengthBadStart:"입력 값은 ",lengthBadEnd:" 사이의 문자여야 합니다.",lengthTooLongStart:"입력 값의 길이가 ",lengthTooLongEnd:" 보다 깁니다.",lengthTooShortStart:"입력 값의 길이가 ",lengthTooShortEnd:" 보다 짧습니다.",notConfirmed:"입력 값이 일치하지 않습니다.",badDomain:"도메인을 정확하게 입력하지 않았습니다.",badUrl:"URL을 정확하게 입력하지 않았습니다.",badCustomVal:"입력 값이 정확하지 않습니다.",badInt:"입력 값이 숫자가 아닙니다.",badSecurityNumber:"주민등록번호가 정확하지 않습니다.",badStrength:"암호를 더 복잡하게 조합해야 합니다.",badNumberOfSelectedOptionsStart:"최소한 ",badNumberOfSelectedOptionsEnd:" 개 항목 이상을 선택해야 합니다.",badAlphaNumeric:"입력 값은 문자와 숫자만 허용합니다.",badAlphaNumericAndExtra:"입력 값은 문자와 숫자와 ",badAlphaNumericExtra:" 만 허용합니다.",badAlphaNumericAndExtraAndSpaces:"입력 값은 문자와 숫자와 ",andSpaces:" 와 빈문자(spaces)만 허용합니다. ",wrongFileSize:"업로드 하려고 하는 파일의 크기가 너무 큽니다. (최대 %s)",wrongFileType:"파일 타입은 %s 만 허용합니다.",groupCheckedRangeStart:"",groupCheckedEnd:" 개 항목을 선택해야 합니다.",groupCheckedTooFewStart:"최소한 ",groupCheckedTooFewEnd:" 개 항목 이상을 선택해야 합니다.",groupCheckedTooManyStart:"",groupCheckedTooManyEnd:" 개 항목 이하를 선택해야 합니다.",badCreditCard:"신용카드번호를 정확하지 않습니다.",badCVV:"CVV 번호가 정확하지 않습니다.",wrongFileDim:"잘못된 이미지 크기 ,",imageTooTall:"이미지 길이가 ",imageTooTallEnd:" 보다 길어야 합니다.",imageTooWide:"이미지 넓이가 ",imageTooWideEnd:" 보다 넓어야 합니다.",imageTooSmall:"이미지 크기가 너무 작습니다.",min:"min",max:"max",imageRatioNotAccepted:"이미지 비율이 맞지 않습니다."}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/nl.js b/form-validator/lang/nl.js new file mode 100644 index 0000000..ae0f5f9 --- /dev/null +++ b/form-validator/lang/nl.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/nl"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={andSpaces:" en spaties ",badAlphaNumeric:"De ingevoerde waarde mag alleen alfabetische karakters bevatten",badAlphaNumericExtra:" en ",badCVV:"Het CVV nummer was onjuist",badCreditCard:"Het creditcardnummer is onjuist",badCustomVal:"De ingevoerde waarde is onjuist",badDate:"U heeft niet de juiste datum aangegeven",badDomain:"Incorrect domein",badEmail:"U heeft een onjuist e-mailadres ingevoerd ",badInt:"De ingevoerde waarde was een onjuist getal",badNumberOfSelectedOptionsEnd:" antwoorden",badNumberOfSelectedOptionsStart:"U moet tenminste ",badSecurityAnswer:"U heeft de beveilingsvraag onjuist beantwoord",badSecurityNumber:"Uw burgerservicenummer was incorrect",badStrength:"Het wachtwoord is niet veilig genoeg",badTelephone:"U heeft een onjuist telefoonnummer ingevoerd",badTime:"U heeft een incorrecte tijd aangegeven",badUrl:"De ingevoerde waarde is geen correcte URL",badreCaptcha:"Bevestig a.u.b. dat u geen robot bent",errorTitle:"Indienen van formulier mislukt!",groupCheckedEnd:" item(s)",groupCheckedRangeStart:"Kies a.u.b. tussen ",groupCheckedTooFewStart:"Kies a.u.b. ten minste ",groupCheckedTooManyStart:"Kies a.u.b. maximaal ",imageRatioNotAccepted:"De afbeeldingsverhouding wordt niet geaccepteerd",imageTooSmall:"de afbeelding was te klein",imageTooTall:"de afbeelding kan niet langer zijn dan",imageTooWide:"de afbeelding kan niet wijder zijn dan",lengthBadEnd:" karakters",lengthBadStart:"De ingevoerde waarde moet liggen tussen ",lengthTooLongStart:"De ingevoerde waarde is langer dan ",lengthTooShortStart:"De ingevoerde waarde is korter dan ",max:"max",min:"min",notConfirmed:"Invoerwaarden konden niet worden bevestigd",requiredField:"Dit is een verplicht veld",requiredFields:"U heeft niet alle verplichte velden ingevuld",wrongFileDim:"Incorrecte afbeeldingsafmetingen,",wrongFileSize:"Het bestand dat u probeert te uploaden is te groot (max %s)",wrongFileType:"Alleen type %s bestanden zijn toegestaan"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/no.js b/form-validator/lang/no.js new file mode 100644 index 0000000..7b4b1eb --- /dev/null +++ b/form-validator/lang/no.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/no"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={andSpaces:" og mellomrom ",badAlphaNumeric:"Inntastningsverdien kan kun inneholde alfanumeriske tegn ",badAlphaNumericExtra:" og ",badCVV:"CVV-nummeret var ikke korrekt",badCreditCard:"Kredittkortnummeret er ikke korrekt",badCustomVal:"Inntastingsverdien er ikke korrekt",badDate:"Du har ikke oppgitt en korrekt dato",badDomain:"Ukorrekt domeneverdi",badEmail:"Du har ikke oppgitt en korrekt e-postadresse",badInt:"Inntastingsverdien er ikke et korrekt tall",badNumberOfSelectedOptionsEnd:" svar",badNumberOfSelectedOptionsStart:"Du må velge minst ",badSecurityAnswer:"Du har ikke oppgitt et korrekt svar på sikkerhetsspørsmålet",badSecurityNumber:"Ditt personnummer var ukorrekt",badStrength:"Passordet er ikke sterkt nok",badTelephone:"Du har ikke oppgitt et korrekt telefonnummer",badTime:"Du har ikke oppgitt en korrekt tid",badUrl:"Inntastingsverdien er ikke en korrekt URL",badreCaptcha:"Vennligst bekreft at du ikke er en robot",errorTitle:"Innsending av skjemaet feilet!",groupCheckedEnd:" ting",groupCheckedRangeStart:"Vennligst velg mellom ",groupCheckedTooFewStart:"Vennligst velg minst ",groupCheckedTooManyStart:"Vennligst velg maksimum ",imageRatioNotAccepted:"Bildestørrelse ikke akseptert",imageTooSmall:"bildet er for lite",imageTooTall:"bildet kan ikke være høyere enn",imageTooWide:"bildet kan ikke være bredere enn",lengthBadEnd:"tegn",lengthBadStart:"Inntastingsverdien må være mellom ",lengthTooLongStart:"Inntastingsverdien er lenger enn ",lengthTooShortStart:"Inntastingsverdien er kortere enn ",max:"maks",min:"min",notConfirmed:"Inntastingsverdier kunne ikke bekreftes",requiredField:"Dette er et obligatorisk felt",requiredFields:"Du har ikke besvart alle obligatoriske felt",wrongFileDim:"Ukorrekte bildedimensjoner,",wrongFileSize:"Bildet du prøver å laste opp er for stort (max %s)",wrongFileType:"Kun filer av type %s er tillatt"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/pl.js b/form-validator/lang/pl.js index 5c9b76e..f0af0e1 100644 --- a/form-validator/lang/pl.js +++ b/form-validator/lang/pl.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a,b){"use strict";a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Złożenie formularza nie powiodło się!",requiredfields:"Nie wszystkie wymagane pola zostały wypełnione",badTime:"Wprowadzono niepoprawny czas",badEmail:"Wprowadzono niepoprawny adres e-mail",badTelephone:"Wprowadzono niepoprawny numeru telefonu",badSecurityAnswer:"Nieprawidłowa odpowiedź na pytanie bezpieczeństwa",badDate:"Niepoprawna data",lengthBadStart:"Wprowadzona wartość musi być pomiędzy",lengthBadEnd:"znaków",lengthTooLongStart:"Wprowadzona wartość jest większa niż",lengthTooShortStart:"Wprowadzona wartość jest mniejsza niż",notConfirmed:"Wprowadzone wartości nie zostały potwierdzone",badDomain:"Nieprawidłowa wartość domeny",badUrl:"Wprowadzono nieprawidłowy adres URL",badCustomVal:"Wprowadzona wartość jest niepoprawna",andSpaces:"i odstępy",badInt:"Wprowadzono nieprawidłowy numer",badSecurityNumber:"Wprowadzono niepoprawny numer ubezpieczenia społecznego",badUKVatAnswer:"Wprowadzono niepoprawny brytyjski numer VAT",badStrength:"Twoje hasło nie jest wystarczająco mocne",badNumberOfSelectedOptionsStart:"Musisz wybrać przynajmniej",badNumberOfSelectedOptionsEnd:"odpowiedzi",badAlphaNumeric:"Wprowadzona wartość może zawierać tylko znaki alfanumeryczne",badAlphaNumericExtra:"i",wrongFileSize:"Wysyłany plik jest zbyt duży (max %s)",wrongFileType:"Dozwolone są tylko pliki typu %s",groupCheckedRangeStart:"Proszę wybrać pomiędzy",groupCheckedTooFewStart:"Proszę wybrać przynajmniej",groupCheckedTooManyStart:"Proszę wybrać maksymalnie",groupCheckedEnd:"element(ów)",badCreditCard:"Podany numer karty kredytowej jest nieprawidłowy",badCVV:"Podany numer CVV jest nieprawidłowy",wrongFileDim:"Nieprawidłowe wymiary obrazu,",imageTooTall:"obraz nie może być wyższa niż",imageTooWide:"obraz nie może być szerszy niż",imageTooSmall:"obraz jest zbyt mały",min:"min",max:"max",imageRatioNotAccepted:"Proporcje obrazu są niepoprawne",badBrazilTelephoneAnswer:"Wprowadzono niepoprawny numer telefonu",badBrazilCEPAnswer:"Wprowadzono niepoprawny CEP",badBrazilCPFAnswer:"Wprowadzono niepoprawny CPF"}})}(jQuery,window); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/pl"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Złożenie formularza nie powiodło się!",requiredField:"To pole jest wymagane",requiredfields:"Nie wszystkie wymagane pola zostały wypełnione",badTime:"Wprowadzono niepoprawny czas",badEmail:"Wprowadzono niepoprawny adres e-mail",badTelephone:"Wprowadzono niepoprawny numeru telefonu",badSecurityAnswer:"Nieprawidłowa odpowiedź na pytanie bezpieczeństwa",badDate:"Niepoprawna data",lengthBadStart:"Wprowadzona wartość musi być pomiędzy ",lengthBadEnd:" znaków",lengthTooLongStart:"Wprowadzona wartość jest większa niż ",lengthTooShortStart:"Wprowadzona wartość jest mniejsza niż ",notConfirmed:"Wprowadzone wartości nie zostały potwierdzone",badDomain:"Nieprawidłowa wartość domeny",badUrl:"Wprowadzono nieprawidłowy adres URL",badCustomVal:"Wprowadzona wartość jest niepoprawna",andSpaces:" i odstępy",badInt:"Wprowadzono nieprawidłowy numer",badSecurityNumber:"Wprowadzono niepoprawny numer ubezpieczenia społecznego",badUKVatAnswer:"Wprowadzono niepoprawny brytyjski numer VAT",badUKNin:"Wprowadzono niepoprawny brytyjski numer NIP",badUKUtr:"Wprowadzono niepoprawny brytyjski numer podatnika",badStrength:"Twoje hasło nie jest wystarczająco mocne",badNumberOfSelectedOptionsStart:"Musisz wybrać przynajmniej ",badNumberOfSelectedOptionsEnd:" odpowiedzi",badAlphaNumeric:"Wprowadzona wartość może zawierać tylko znaki alfanumeryczne ",badAlphaNumericExtra:" i ",wrongFileSize:"Wysyłany plik jest zbyt duży (max %s)",wrongFileType:"Dozwolone są tylko pliki typu %s",groupCheckedRangeStart:"Proszę wybrać pomiędzy ",groupCheckedTooFewStart:"Proszę wybrać przynajmniej ",groupCheckedTooManyStart:"Proszę wybrać maksymalnie ",groupCheckedEnd:" element(ów)",badCreditCard:"Podany numer karty kredytowej jest nieprawidłowy",badCVV:"Podany numer CVV jest nieprawidłowy",wrongFileDim:"Nieprawidłowe wymiary obrazu,",imageTooTall:"obraz nie może być wyższa niż",imageTooWide:"obraz nie może być szerszy niż",imageTooSmall:"obraz jest zbyt mały",min:"min",max:"max",imageRatioNotAccepted:"Proporcje obrazu są niepoprawne",badBrazilTelephoneAnswer:"Wprowadzono niepoprawny numer telefonu",badBrazilCEPAnswer:"Wprowadzono niepoprawny CEP",badBrazilCPFAnswer:"Wprowadzono niepoprawny CPF",badPlPesel:"Wprowadzono niepoprawny numer PESEL",badPlNip:"Wprowadzono niepoprawny numer NIP",badPlRegon:"Wprowadzono niepoprawny numer REGON",badreCaptcha:"Potwierdź że nie jesteś botem!"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/pt.js b/form-validator/lang/pt.js index e525bde..089ab14 100644 --- a/form-validator/lang/pt.js +++ b/form-validator/lang/pt.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a,b){"use strict";a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"O formulário não pode ser enviado!",requiredFields:"Você ainda não preencheu todos os campos obrigatórios",badTime:"A hora digitada não é válida",badEmail:"O e-mail digitado não é válido",badTelephone:"O telefone digitado não é válido",badSecurityAnswer:"A pergunta de segurança não foi respondida corretamente",badDate:"A data digitada não é válida",lengthBadStart:"Sua resposta deve incluir entre ",lengthBadEnd:" caracteres",lengthTooLongStart:"Sua resposta tem mais que ",lengthTooShortStart:"Sua resposta tem menos que",notConfirmed:"As informações digitadas não puderam ser confirmadas",badDomain:"O domínio digitado não é válido",badUrl:"A URL digitada não é válida",badCustomVal:"Os dados digitados não são válidos",andSpaces:" e espaços",badInt:"O número digitado não é válido",badSecurityNumber:"O número de seguro social digitado não é válido",badUKVatAnswer:"O número do VAT digitado não é válido para o Reino Unido",badStrength:"Senha muito fraca",badNumberOfSelectedOptionsStart:"Selecione pelo menos",badNumberOfSelectedOptionsEnd:" alternativa(s)",badAlphaNumeric:"Use somente caracteres alfanuméricos (letras a-z e números)",badAlphaNumericExtra:" e",wrongFileSize:"O arquivo selecionado é maior que o tamanho máximo permitido (%s)",wrongFileType:"Somente arquivos %s são permitidos",groupCheckedRangeStart:"Por favor, escolha entre ",groupCheckedTooFewStart:"Por favor, escolha pelo menos ",groupCheckedTooManyStart:"Por favor, escolhe no máximo ",groupCheckedEnd:" alternativa(s)",badCreditCard:"O número de cartão de crédito digitado não é válido",badCVV:"O código de segurança do cartão de crédito não é válido",wrongFileDim:"As dimensões da imagem não são válidas",imageTooTall:"a imagem não pode ser mais alta que ",imageTooWide:"a imagem não pode ser mais larga que ",imageTooSmall:"a imagem é muito pequena",min:"min",max:"max",imageRatioNotAccepted:"A proporção da imagem (largura x altura) não é válida",badBrazilTelephoneAnswer:"O número de telefone digitado é inválido",badBrazilCEPAnswer:"O CEP digitado é inválido",badBrazilCPFAnswer:"O CPF digitado é inválido"}})}(jQuery,window); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/pt"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"O formulário não pode ser enviado!",requiredField:"Campo de preenchimento obrigatório",requiredFields:"Você ainda não preencheu todos os campos obrigatórios",badTime:"A hora digitada não é válida",badEmail:"O e-mail digitado não é válido",badTelephone:"O telefone digitado não é válido",badSecurityAnswer:"A pergunta de segurança não foi respondida corretamente",badDate:"A data digitada não é válida",lengthBadStart:"Sua resposta deve incluir entre ",lengthBadEnd:" caracteres",lengthTooLongStart:"Sua resposta tem mais que ",lengthTooShortStart:"Sua resposta tem menos que",notConfirmed:"As informações digitadas não puderam ser confirmadas",badDomain:"O domínio digitado não é válido",badUrl:"A URL digitada não é válida",badCustomVal:"Os dados digitados não são válidos",andSpaces:" e espaços",badInt:"O número digitado não é válido",badSecurityNumber:"O número de seguro social digitado não é válido",badUKVatAnswer:"O número do VAT digitado não é válido para o Reino Unido",badStrength:"Senha muito fraca",badNumberOfSelectedOptionsStart:"Selecione pelo menos",badNumberOfSelectedOptionsEnd:" alternativa(s)",badAlphaNumeric:"Use somente caracteres alfanuméricos (letras a-z e números)",badAlphaNumericExtra:" e",wrongFileSize:"O arquivo selecionado é maior que o tamanho máximo permitido (%s)",wrongFileType:"Somente arquivos %s são permitidos",groupCheckedRangeStart:"Por favor, escolha entre ",groupCheckedTooFewStart:"Por favor, escolha pelo menos ",groupCheckedTooManyStart:"Por favor, escolhe no máximo ",groupCheckedEnd:" alternativa(s)",badCreditCard:"O número de cartão de crédito digitado não é válido",badCVV:"O código de segurança do cartão de crédito não é válido",wrongFileDim:"As dimensões da imagem não são válidas",imageTooTall:"a imagem não pode ser mais alta que ",imageTooWide:"a imagem não pode ser mais larga que ",imageTooSmall:"a imagem é muito pequena",min:"min",max:"max",imageRatioNotAccepted:"A proporção da imagem (largura x altura) não é válida",badBrazilTelephoneAnswer:"O número de telefone digitado é inválido",badBrazilCEPAnswer:"O CEP digitado é inválido",badBrazilCPFAnswer:"O CPF digitado é inválido"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/ro.js b/form-validator/lang/ro.js index 59ea055..b413e2e 100644 --- a/form-validator/lang/ro.js +++ b/form-validator/lang/ro.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a,b){"use strict";a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Nu s-a reu?it plasarea forumlarului!",requiredfields:"Nu toate câmpurile obligatorii au fost completate",badTime:"Timpul introdus este incorect",badEmail:"Adresa de e-mail este incorectă",badTelephone:"Numărul de telefon este incorect",badSecurityAnswer:"Răspuns incorect la întrebarea de siguran?ă",badDate:"Dară incorectă",lengthBadStart:"Valoarea introdusă trebuie să fie interval",lengthBadEnd:"caractere",lengthTooLongStart:"Valoarea introdusă este mai mare decât",lengthTooShortStart:"Valoarea introdusă este mai mică decât",notConfirmed:"Valorile introduse nu au fost confirmate",badDomain:"Domeniul este incorect",badUrl:"Adresa URL este incorectă",badCustomVal:"Valoarea introdusă este incorectă",andSpaces:"?i spa?ierea",badInt:"Numărul introdus este incorect",badSecurityNumber:"Numărul de asigurare introdus este incorect",badUKVatAnswer:"Numărul CIF introdus este incorect",badStrength:"Parola Dvs nu este suficient de sigură",badNumberOfSelectedOptionsStart:"Trebuie să alegi măcar",badNumberOfSelectedOptionsEnd:"răspunsuri",badAlphaNumeric:"Valoarea introdusă trebuie să con?ină doar caractere alfanumerice",badAlphaNumericExtra:"?i",wrongFileSize:"Fi?ierul trimis este prea mare (max %s)",wrongFileType:"Se acceptă doar fi?iere tip %s",groupCheckedRangeStart:"Te rog alege între",groupCheckedTooFewStart:"Te rog alege măcar",groupCheckedTooManyStart:"Te rog alege maxim",groupCheckedEnd:"elemnt(e)",badCreditCard:"Numărul de card introdus este incorect",badCVV:"Numărul CVV introdus este incorect",wrongFileDim:"Dimensiunea imaginii este incorectă,",imageTooTall:"imaginea nu poate fi mai înaltă decât",imageTooWide:"imaginea nu poate fi mai lată decât",imageTooSmall:"imaginea este prea mică",min:"min",max:"max",imageRatioNotAccepted:"Propor?iile imaginii sunt incorecte",badBrazilTelephoneAnswer:"Numărul de telefon introdus este incorect.",badBrazilCEPAnswer:"CEP incorect",badBrazilCPFAnswer:"CPF incorect"}})}(jQuery,window); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/ro"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Nu sa reusit lansarea formularului!",requiredField:"Acest câmp este obligatoriu",requiredfields:"Nu toate câmpurile obligatorii au fost completate",badTime:"Timpul introdus este incorect",badEmail:"Adresa de e-mail este incorectă",badTelephone:"Numărul de telefon este incorect",badSecurityAnswer:"Răspuns incorect la întrebarea de siguran?ă",badDate:"Dară incorectă",lengthBadStart:"Valoarea introdusă trebuie să fie interval ",lengthBadEnd:" caractere",lengthTooLongStart:"Valoarea introdusă este mai mare decât ",lengthTooShortStart:"Valoarea introdusă este mai mică decât ",notConfirmed:"Valorile introduse nu au fost confirmate",badDomain:"Domeniul este incorect",badUrl:"Adresa URL este incorectă",badCustomVal:"Valoarea introdusă este incorectă",andSpaces:" şi spaţierea",badInt:"Numărul introdus este incorect",badSecurityNumber:"Numărul de asigurare introdus este incorect",badUKVatAnswer:"Numărul CIF introdus este incorect",badStrength:"Parola Dvs nu este suficient de sigură",badNumberOfSelectedOptionsStart:"Trebuie să alegi măcar ",badNumberOfSelectedOptionsEnd:" răspunsuri",badAlphaNumeric:"Valoarea introdusă trebuie să con însă doar caractere alfanumerice ",badAlphaNumericExtra:" și ",wrongFileSize:"Fisierul trimis este prea mare (max %s)",wrongFileType:"Se acceptă doar fisiere tip %s",groupCheckedRangeStart:"Te rog alege între ",groupCheckedTooFewStart:"Te rog alege măcar ",groupCheckedTooManyStart:"Te rog alege maxim ",groupCheckedEnd:" elemnt(e)",badCreditCard:"Numărul de card introdus este incorect",badCVV:"Numărul CVV introdus este incorect",wrongFileDim:"Dimensiunea imaginii este incorectă,",imageTooTall:"imaginea nu poate fi mai înaltă decât",imageTooWide:"imaginea nu poate fi mai lată decât",imageTooSmall:"imaginea este prea mică",min:"min",max:"max",imageRatioNotAccepted:"Proportiile imaginii sunt incorecte",badBrazilTelephoneAnswer:"Numărul de telefon introdus este incorect.",badBrazilCEPAnswer:"CEP incorect",badBrazilCPFAnswer:"CPF incorect"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/ru.js b/form-validator/lang/ru.js index 2554042..63f018c 100644 --- a/form-validator/lang/ru.js +++ b/form-validator/lang/ru.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.85 */ -!function(a,b){"use strict";a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Ошибка отправки формы!",requiredFields:"Вы задали не все обязательные поля",badTime:"Вы задали некорректное время",badEmail:"Вы задали некорректный e-mail",badTelephone:"Вы задали некорректный номер телефона",badSecurityAnswer:"Вы задали некорректный ответ на секретный вопрос",badDate:"Вы задали некорректную дату",lengthBadStart:"Значение должно быть в диапазоне",lengthBadEnd:" символов",lengthTooLongStart:"Значение длинее, чем ",lengthTooShortStart:"Значение меньше, чем ",notConfirmed:"Введённые значения не могут быть подтверждены",badDomain:"Некорректное значение домена",badUrl:"Некорретный URL",badCustomVal:"Введённое значение неверно",andSpaces:" и пробелы ",badInt:"Значение - не число",badSecurityNumber:"Введённый защитный номер - неправильный",badUKVatAnswer:"Некорректный UK VAT номер",badStrength:"Пароль не достаточно надёжен",badNumberOfSelectedOptionsStart:"Вы должны выбрать как минимум ",badNumberOfSelectedOptionsEnd:" ответов",badAlphaNumeric:"Значение должно содержать только числа и буквы ",badAlphaNumericExtra:" и ",wrongFileSize:"Загружаемый файл слишком велик (максимальный размер %s)",wrongFileType:"Принимаются файлы следующих типов %s",groupCheckedRangeStart:"Выберите между ",groupCheckedTooFewStart:"Выберите как минимум ",groupCheckedTooManyStart:"Выберите максимум из ",groupCheckedEnd:" элемент(ов)",badCreditCard:"Номер кредитной карты некорректен",badCVV:"CVV номер некорректно",wrongFileDim:"Неверные размеры графического файла,",imageTooTall:"изображение не может быть уже чем",imageTooWide:"изображение не может быть шире чем",imageTooSmall:"изображение слишком мало",min:"минимум",max:"максимум",imageRatioNotAccepted:"Изображение с таким соотношением сторон не принимается",badBrazilTelephoneAnswer:"Введённый номер телефона неправильный",badBrazilCEPAnswer:"CEP неправильный",badBrazilCPFAnswer:"CPF неправильный"}})}(jQuery,window); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/ru"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Ошибка отправки формы!",requiredField:"Это обязательное поле",requiredFields:"Вы задали не все обязательные поля",badTime:"Вы задали некорректное время",badEmail:"Вы задали некорректный e-mail",badTelephone:"Вы задали некорректный номер телефона",badSecurityAnswer:"Вы задали некорректный ответ на секретный вопрос",badDate:"Вы задали некорректную дату",lengthBadStart:"Значение должно быть в диапазоне",lengthBadEnd:" символов",lengthTooLongStart:"Значение длинее, чем ",lengthTooShortStart:"Значение меньше, чем ",notConfirmed:"Введённые значения не могут быть подтверждены",badDomain:"Некорректное значение домена",badUrl:"Некорретный URL",badCustomVal:"Введённое значение неверно",andSpaces:" и пробелы ",badInt:"Значение - не число",badSecurityNumber:"Введённый защитный номер - неправильный",badUKVatAnswer:"Некорректный UK VAT номер",badStrength:"Пароль не достаточно надёжен",badNumberOfSelectedOptionsStart:"Вы должны выбрать как минимум ",badNumberOfSelectedOptionsEnd:" ответов",badAlphaNumeric:"Значение должно содержать только числа и буквы ",badAlphaNumericExtra:" и ",wrongFileSize:"Загружаемый файл слишком велик (максимальный размер %s)",wrongFileType:"Принимаются файлы следующих типов %s",groupCheckedRangeStart:"Выберите между ",groupCheckedTooFewStart:"Выберите как минимум ",groupCheckedTooManyStart:"Выберите максимум из ",groupCheckedEnd:" элемент(ов)",badCreditCard:"Номер кредитной карты некорректен",badCVV:"CVV номер некорректно",wrongFileDim:"Неверные размеры графического файла,",imageTooTall:"изображение не может быть уже чем",imageTooWide:"изображение не может быть шире чем",imageTooSmall:"изображение слишком мало",min:"минимум",max:"максимум",imageRatioNotAccepted:"Изображение с таким соотношением сторон не принимается",badBrazilTelephoneAnswer:"Введённый номер телефона неправильный",badBrazilCEPAnswer:"CEP неправильный",badBrazilCPFAnswer:"CPF неправильный"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/sv.js b/form-validator/lang/sv.js index 0b7e750..7f574af 100644 --- a/form-validator/lang/sv.js +++ b/form-validator/lang/sv.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a,b){"use strict";a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Formuläret kunde inte skickas!",requiredFields:"Du har inte besvarat alla frågor",badTime:"Du har inte angett en korrekt tidpunkt",badEmail:"Du har inte angett en korrekt e-postadress",badTelephone:"Du har inte angett ett korrekt telefonnummer",badSecurityAnswer:"Du har angett fel svar på säkerhetsfrågan",badDate:"Du har anget ett felaktigt datum",lengthBadStart:"Ditt svar måste innehålla mellan ",lengthBadEnd:" tecken",lengthTooLongStart:"Du har angett ett svar som är längre än ",lengthTooShortStart:"Du har angett ett svar som är kortare än ",notConfirmed:"Svaren kunde inte bekräfta varandra",badDomain:"Du har angett en inkorrekt domän",badUrl:"Du har inte angett en korrekt webbadress",badCustomVal:"Du har anget ett inkorrekt svar",andSpaces:" och mellanslag ",badInt:"Du har inte angett en siffra",badSecurityNumber:"Du har angett ett felaktigt personnummer",badUKVatAnswer:"Du har inte angett ett brittiskt moms-nummer",badStrength:"Du har angett ett lösenord som inte är nog säkert",badNumberOfSelectedOptionsStart:"Du måste åtminstone välja ",badNumberOfSelectedOptionsEnd:" svarsalternativ",badAlphaNumeric:"Du kan endast svara med alfanumersika tecken (a-z och siffror)",badAlphaNumericExtra:" och ",wrongFileSize:"Filen du försöker ladda upp är för stor (max %s)",wrongFileType:"Endast filer av typen %s är tillåtna",groupCheckedRangeStart:"Välj mellan ",groupCheckedTooFewStart:"Då måste göra minst ",groupCheckedTooManyStart:"Du får inte göra fler än ",groupCheckedEnd:" val",badCreditCard:"Du har angett ett felaktigt kreditkortsnummer",badCVV:"Du har angett ett felaktigt CVV-nummer",wrongFileDim:"Otillåten bildstorlek,",imageTooTall:"bilden får inte vara högre än",imageTooWide:"bilden får inte vara bredare än",imageTooSmall:"bilden är för liten",genericBadInputValue:"The input value can be accepted",min:"minst",max:"max",imageRatioNotAccepted:"Bildens dimensioner (förhållandet mellan höjd och längd) kan inte accepteras"}})}(jQuery,window); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/sv"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Formuläret kunde inte skickas!",requiredField:"Detta är ett obligtoriskt fält",requiredFields:"Du har inte besvarat alla frågor",badTime:"Du har inte angett en korrekt tidpunkt",badEmail:"Du har inte angett en korrekt e-postadress",badTelephone:"Du har inte angett ett korrekt telefonnummer",badSecurityAnswer:"Du har angett fel svar på säkerhetsfrågan",badDate:"Du har anget ett felaktigt datum",lengthBadStart:"Ditt svar måste innehålla mellan ",lengthBadEnd:" tecken",lengthTooLongStart:"Du har angett ett svar som är längre än ",lengthTooShortStart:"Du har angett ett svar som är kortare än ",notConfirmed:"Svaren kunde inte bekräfta varandra",badDomain:"Du har angett en inkorrekt domän",badUrl:"Du har inte angett en korrekt webbadress",badCustomVal:"Du har anget ett inkorrekt svar",andSpaces:" och mellanslag ",badInt:"Du har inte angett en siffra",badSecurityNumber:"Du har angett ett felaktigt personnummer",badUKVatAnswer:"Du har inte angett ett brittiskt moms-nummer",badStrength:"Du har angett ett lösenord som inte är nog säkert",badNumberOfSelectedOptionsStart:"Du måste åtminstone välja ",badNumberOfSelectedOptionsEnd:" svarsalternativ",badAlphaNumeric:"Du kan endast svara med alfanumersika tecken (a-z och siffror)",badAlphaNumericExtra:" och ",wrongFileSize:"Filen du försöker ladda upp är för stor (max %s)",wrongFileType:"Endast filer av typen %s är tillåtna",groupCheckedRangeStart:"Välj mellan ",groupCheckedTooFewStart:"Då måste göra minst ",groupCheckedTooManyStart:"Du får inte göra fler än ",groupCheckedEnd:" val",badCreditCard:"Du har angett ett felaktigt kreditkortsnummer",badCVV:"Du har angett ett felaktigt CVV-nummer",wrongFileDim:"Otillåten bildstorlek,",imageTooTall:"bilden får inte vara högre än",imageTooWide:"bilden får inte vara bredare än",imageTooSmall:"bilden är för liten",genericBadInputValue:"The input value can be accepted",min:"minst",max:"max",imageRatioNotAccepted:"Bildens dimensioner (förhållandet mellan höjd och längd) kan inte accepteras"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/tr.js b/form-validator/lang/tr.js new file mode 100644 index 0000000..4fc53d3 --- /dev/null +++ b/form-validator/lang/tr.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/tr"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Form gönderilemedi!",requiredField:"Boş bırakılamaz",requiredFields:"Gerekli tüm alanları cevaplamadınız",badTime:"Geçersiz zaman girdiniz",badEmail:"Geçersiz e-posta adresi girdiniz",badTelephone:"Geçersiz telefon numarası girdiniz",badSecurityAnswer:"Güvenlik sorusuna doğru cevap vermediniz",badDate:"Geçersiz tarih girdiniz",lengthBadStart:"Girilen değer ",lengthBadEnd:" karakter olmalıdır",lengthTooLongStart:"Girilen değer en fazla ",lengthTooShortStart:"Girilen değer en az ",notConfirmed:"Girilen değerler uyuşmuyor",badDomain:"Geçersiz alan adı girdiniz",badUrl:"Geçersiz bağlantı girdiniz",badCustomVal:"Geçersiz değer girdiniz",andSpaces:" ve boşluk ",badInt:"Girilen değer sayı olamlıdır",badSecurityNumber:"Geçersiz güvenlik kodu girdiniz",badUKVatAnswer:"Geçersiz İngiltere KDV numarası girdiniz",badUKNin:"Geçersiz İngiltere NIN numarası girdiniz",badUKUtr:"Geçersiz İngiltere UTR numarası girdiniz",badStrength:"Şifreniz yeterince güçlü değil",badNumberOfSelectedOptionsStart:"En az ",badNumberOfSelectedOptionsEnd:" cevap seçmeniz gerekiyor",badAlphaNumeric:"Kabul edilen değer sadece alfanümerik karakterler ",badAlphaNumericExtra:" ve ",wrongFileSize:"Yüklemeye çalıştığınız dosya (en fazla %s) çok büyük",wrongFileType:"Yalnızca %s türündeki dosyaları yükleyebilirsiniz",groupCheckedRangeStart:"Lütfen ",groupCheckedTooFewStart:"Lütfen en az ",groupCheckedTooManyStart:"Lütfen en fazla ",groupCheckedEnd:" adet seçiniz",badCreditCard:"Geçersiz kredi kartı numarası girdiniz",badCVV:"Geçersiz CVV numarası girdiniz",wrongFileDim:"Hatalı resim yüklediniz çünkü",imageTooTall:"resim daha uzun olamaz",imageTooWide:"resim daha geniş olamaz",imageTooSmall:"görüntü çok küçük",min:"min",max:"max",imageRatioNotAccepted:"Kabul edilmeye görüntü oranı",badBrazilTelephoneAnswer:"Geçersiz telefon numarası girdiniz",badBrazilCEPAnswer:"Geçersiz Brezilya posta kodu girdiniz",badBrazilCPFAnswer:"Geçersiz Brezilya mükellef kayıt kimliği girdiniz",badPlPesel:"Geçersiz Polonya kişisel kimlik numarası girdiniz",badPlNip:"Geçersiz DKV girdiniz",badPlRegon:"Geçersiz Polonya ticari kimlik numarası girdiniz",badreCaptcha:"Lütfen bot olmadığınızı doğrulayın",passwordComplexityStart:"Şifreniz en az ",passwordComplexitySeparator:", ",passwordComplexityUppercaseInfo:" büyük harf",passwordComplexityLowercaseInfo:" küçük harf",passwordComplexitySpecialCharsInfo:" özel karakter",passwordComplexityNumericCharsInfo:" sayısal karakter",passwordComplexityEnd:" içermelidir"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/lang/vi.js b/form-validator/lang/vi.js new file mode 100644 index 0000000..02f19f0 --- /dev/null +++ b/form-validator/lang/vi.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/vi"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"Có lỗi trong qua trình gửi dữ liệu!",requiredFields:"Bạn chưa nhập đủ các thông tin bắt buộc",badTime:"Thời gian chưa chính xác",badEmail:"Địa chỉ email chưa chính xác",badTelephone:"Số điện thoại chưa chính xác",badSecurityAnswer:"Câu hỏi bảo mật chưa chính xác",badDate:"Ngày tháng chưa chính xác",lengthBadStart:"Yêu cầu nhập từ ",lengthBadEnd:" ký tự",lengthTooLongStart:"Dữ liệu quá dài, yêu cầu ít hơn ",lengthTooShortStart:"Dữ liệu quá ngắn, yêu cầu nhiều hơn ",notConfirmed:"Dữ liệu không được xác nhận",badDomain:"Tên miền chưa chính xác",badUrl:"Địa chỉ website chưa chính xác",badCustomVal:"Dữ liệu chưa chính xác",andSpaces:" và các khoảng cách ",badInt:"Yêu cầu chỉ nhập số",badSecurityNumber:"Mã bảo mật chưa chính xác",badUKVatAnswer:"UK VAT chưa chính xác",badStrength:"Mật khẩu chưa đủ độ phức tạp",badNumberOfSelectedOptionsStart:"Bạn cần tích chọn ít nhất ",badNumberOfSelectedOptionsEnd:" lựa chọn",badAlphaNumeric:"Yêu cầu chỉ nhập chữ hoặc số ",badAlphaNumericExtra:" và ",wrongFileSize:"File của bạn quá lớn (chỉ chấp nhận file không quá %s)",wrongFileType:"Chỉ cho phép các định dạng file sau: %s",groupCheckedRangeStart:"Vui lòng tích chọn từ ",groupCheckedTooFewStart:"Vui lòng tích chọn ít nhất ",groupCheckedTooManyStart:"Vui lòng tích chọn nhiều nhất ",groupCheckedEnd:" lựa chọn",badCreditCard:"Mã thẻ chưa chính xác",badCVV:"Mã bảo mật (CVV) chưa chính xác",wrongFileDim:"Kích thước ảnh chưa chính xác,",imageTooTall:"Chiều cao ảnh không được vượt quá",imageTooWide:"Chiều rộng ảnh không được vượt quá",imageTooSmall:"Kích thước ảnh quá nhỏ",min:"nhỏ nhất",max:"lớn nhất",imageRatioNotAccepted:"Tỷ lệ ảnh chưa chính xác"}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/location.dev.js b/form-validator/location.dev.js deleted file mode 100644 index a9d86fb..0000000 --- a/form-validator/location.dev.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * jQuery Form Validator Module: Date - * ------------------------------------------ - * Created by Victor Jonsson - * - * The following validators will be added by this module: - * - Country - * - US state - * - longitude and latitude - * - * @website http://formvalidator.net/#location-validators - * @license MIT - * @version 2.2.83 - */ -(function($) { - - /* - * Validate that country exists - */ - $.formUtils.addValidator({ - name : 'country', - validatorFunction : function(str) { - return $.inArray(str.toLowerCase(), this.countries) > -1; - }, - countries : ['afghanistan','albania','algeria','american samoa','andorra','angola','anguilla','antarctica','antigua and barbuda','arctic ocean','argentina','armenia','aruba','ashmore and cartier islands','atlantic ocean','australia','austria','azerbaijan','bahamas','bahrain','baltic sea','baker island','bangladesh','barbados','bassas da india','belarus','belgium','belize','benin','bermuda','bhutan','bolivia','borneo','bosnia and herzegovina','botswana','bouvet island','brazil','british virgin islands','brunei','bulgaria','burkina faso','burundi','cambodia','cameroon','canada','cape verde','cayman islands','central african republic','chad','chile','china','christmas island','clipperton island','cocos islands','colombia','comoros','cook islands','coral sea islands','costa rica','croatia','cuba','cyprus','czech republic','democratic republic of the congo','denmark','djibouti','dominica','dominican republic','east timor','ecuador','egypt','el salvador','equatorial guinea','eritrea','estonia','ethiopia','europa island','falkland islands','faroe islands','fiji','finland','france','french guiana','french polynesia','french southern and antarctic lands','gabon','gambia','gaza strip','georgia','germany','ghana','gibraltar','glorioso islands','greece','greenland','grenada','guadeloupe','guam','guatemala','guernsey','guinea','guinea-bissau','guyana','haiti','heard island and mcdonald islands','honduras','hong kong','howland island','hungary','iceland','india','indian ocean','indonesia','iran','iraq','ireland','isle of man','israel','italy','jamaica','jan mayen','japan','jarvis island','jersey','johnston atoll','jordan','juan de nova island','kazakhstan','kenya','kerguelen archipelago','kingman reef','kiribati','kosovo','kuwait','kyrgyzstan','laos','latvia','lebanon','lesotho','liberia','libya','liechtenstein','lithuania','luxembourg','macau','macedonia','madagascar','malawi','malaysia','maldives','mali','malta','marshall islands','martinique','mauritania','mauritius','mayotte','mediterranean sea','mexico','micronesia','midway islands','moldova','monaco','mongolia','montenegro','montserrat','morocco','mozambique','myanmar','namibia','nauru','navassa island','nepal','netherlands','netherlands antilles','new caledonia','new zealand','nicaragua','niger','nigeria','niue','norfolk island','north korea','north sea','northern mariana islands','norway','oman','pacific ocean','pakistan','palau','palmyra atoll','panama','papua new guinea','paracel islands','paraguay','peru','philippines','pitcairn islands','poland','portugal','puerto rico','qatar','republic of the congo','reunion','romania','ross sea','russia','rwanda','saint helena','saint kitts and nevis','saint lucia','saint pierre and miquelon','saint vincent and the grenadines','samoa','san marino','sao tome and principe','saudi arabia','senegal','serbia','seychelles','sierra leone','singapore','slovakia','slovenia','solomon islands','somalia','south africa','south georgia and the south sandwich islands','south korea','southern ocean','spain','spratly islands','sri lanka','sudan','suriname','svalbard','swaziland','sweden','switzerland','syria','taiwan','tajikistan','tanzania','tasman sea','thailand','togo','tokelau','tonga','trinidad and tobago','tromelin island','tunisia','turkey','turkmenistan','turks and caicos islands','tuvalu','uganda','ukraine','united arab emirates','united kingdom','uruguay','usa','uzbekistan','vanuatu','venezuela','viet nam','virgin islands','wake island','wallis and futuna','west bank','western sahara','yemen','zambia','zimbabwe'], - errorMessage : '', - errorMessageKey: 'badCustomVal' - }); - - /* - * Is this a valid federate state in the US - */ - $.formUtils.addValidator({ - name : 'federatestate', - validatorFunction : function(str) { - return $.inArray(str.toLowerCase(), this.states) > -1; - }, - states : ['alabama','alaska', 'arizona', 'arkansas','california','colorado','connecticut','delaware','florida','georgia','hawaii','idaho','illinois','indiana','iowa','kansas','kentucky','louisiana','maine','maryland', 'district of columbia', 'massachusetts','michigan','minnesota','mississippi','missouri','montana','nebraska','nevada','new hampshire','new jersey','new mexico','new york','north carolina','north dakota','ohio','oklahoma','oregon','pennsylvania','rhode island','south carolina','south dakota','tennessee','texas','utah','vermont','virginia','washington','west virginia','wisconsin','wyoming'], - errorMessage : '', - errorMessageKey: 'badCustomVal' - }); - - - $.formUtils.addValidator({ - name : 'longlat', - validatorFunction : function(str) { - var regexp = /^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/; - return regexp.test(str); - }, - errorMessage:'', - errorMessageKey:'badCustomVal' - }); - - /** - * @private - * @param {Array} listItems - * @return {Array} - */ - var _makeSortedList = function(listItems) { - var newList = []; - $.each(listItems, function(i, v) { - newList.push(v.substr(0,1).toUpperCase() + v.substr(1, v.length)); - }); - newList.sort(); - return newList; - }; - - $.fn.suggestCountry = function(settings) { - var country = _makeSortedList($.formUtils.validators.validate_country.countries); - return $.formUtils.suggest(this, country, settings); - }; - - $.fn.suggestState = function(settings) { - var states = _makeSortedList($.formUtils.validators.validate_federatestate.states); - return $.formUtils.suggest(this, states, settings); - }; - -})(jQuery); diff --git a/form-validator/location.js b/form-validator/location.js index c953b6d..0598731 100644 --- a/form-validator/location.js +++ b/form-validator/location.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a){a.formUtils.addValidator({name:"country",validatorFunction:function(b){return a.inArray(b.toLowerCase(),this.countries)>-1},countries:["afghanistan","albania","algeria","american samoa","andorra","angola","anguilla","antarctica","antigua and barbuda","arctic ocean","argentina","armenia","aruba","ashmore and cartier islands","atlantic ocean","australia","austria","azerbaijan","bahamas","bahrain","baltic sea","baker island","bangladesh","barbados","bassas da india","belarus","belgium","belize","benin","bermuda","bhutan","bolivia","borneo","bosnia and herzegovina","botswana","bouvet island","brazil","british virgin islands","brunei","bulgaria","burkina faso","burundi","cambodia","cameroon","canada","cape verde","cayman islands","central african republic","chad","chile","china","christmas island","clipperton island","cocos islands","colombia","comoros","cook islands","coral sea islands","costa rica","croatia","cuba","cyprus","czech republic","democratic republic of the congo","denmark","djibouti","dominica","dominican republic","east timor","ecuador","egypt","el salvador","equatorial guinea","eritrea","estonia","ethiopia","europa island","falkland islands","faroe islands","fiji","finland","france","french guiana","french polynesia","french southern and antarctic lands","gabon","gambia","gaza strip","georgia","germany","ghana","gibraltar","glorioso islands","greece","greenland","grenada","guadeloupe","guam","guatemala","guernsey","guinea","guinea-bissau","guyana","haiti","heard island and mcdonald islands","honduras","hong kong","howland island","hungary","iceland","india","indian ocean","indonesia","iran","iraq","ireland","isle of man","israel","italy","jamaica","jan mayen","japan","jarvis island","jersey","johnston atoll","jordan","juan de nova island","kazakhstan","kenya","kerguelen archipelago","kingman reef","kiribati","kosovo","kuwait","kyrgyzstan","laos","latvia","lebanon","lesotho","liberia","libya","liechtenstein","lithuania","luxembourg","macau","macedonia","madagascar","malawi","malaysia","maldives","mali","malta","marshall islands","martinique","mauritania","mauritius","mayotte","mediterranean sea","mexico","micronesia","midway islands","moldova","monaco","mongolia","montenegro","montserrat","morocco","mozambique","myanmar","namibia","nauru","navassa island","nepal","netherlands","netherlands antilles","new caledonia","new zealand","nicaragua","niger","nigeria","niue","norfolk island","north korea","north sea","northern mariana islands","norway","oman","pacific ocean","pakistan","palau","palmyra atoll","panama","papua new guinea","paracel islands","paraguay","peru","philippines","pitcairn islands","poland","portugal","puerto rico","qatar","republic of the congo","reunion","romania","ross sea","russia","rwanda","saint helena","saint kitts and nevis","saint lucia","saint pierre and miquelon","saint vincent and the grenadines","samoa","san marino","sao tome and principe","saudi arabia","senegal","serbia","seychelles","sierra leone","singapore","slovakia","slovenia","solomon islands","somalia","south africa","south georgia and the south sandwich islands","south korea","southern ocean","spain","spratly islands","sri lanka","sudan","suriname","svalbard","swaziland","sweden","switzerland","syria","taiwan","tajikistan","tanzania","tasman sea","thailand","togo","tokelau","tonga","trinidad and tobago","tromelin island","tunisia","turkey","turkmenistan","turks and caicos islands","tuvalu","uganda","ukraine","united arab emirates","united kingdom","uruguay","usa","uzbekistan","vanuatu","venezuela","viet nam","virgin islands","wake island","wallis and futuna","west bank","western sahara","yemen","zambia","zimbabwe"],errorMessage:"",errorMessageKey:"badCustomVal"}),a.formUtils.addValidator({name:"federatestate",validatorFunction:function(b){return a.inArray(b.toLowerCase(),this.states)>-1},states:["alabama","alaska","arizona","arkansas","california","colorado","connecticut","delaware","florida","georgia","hawaii","idaho","illinois","indiana","iowa","kansas","kentucky","louisiana","maine","maryland","district of columbia","massachusetts","michigan","minnesota","mississippi","missouri","montana","nebraska","nevada","new hampshire","new jersey","new mexico","new york","north carolina","north dakota","ohio","oklahoma","oregon","pennsylvania","rhode island","south carolina","south dakota","tennessee","texas","utah","vermont","virginia","washington","west virginia","wisconsin","wyoming"],errorMessage:"",errorMessageKey:"badCustomVal"}),a.formUtils.addValidator({name:"longlat",validatorFunction:function(a){var b=/^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/;return b.test(a)},errorMessage:"",errorMessageKey:"badCustomVal"});var b=function(b){var c=[];return a.each(b,function(a,b){c.push(b.substr(0,1).toUpperCase()+b.substr(1,b.length))}),c.sort(),c};a.fn.suggestCountry=function(c){var d=b(a.formUtils.validators.validate_country.countries);return a.formUtils.suggest(this,d,c)},a.fn.suggestState=function(c){var d=b(a.formUtils.validators.validate_federatestate.states);return a.formUtils.suggest(this,d,c)}}(jQuery); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.formUtils.registerLoadedModule("location"),a.formUtils.addValidator({name:"country",validatorFunction:function(b){return a.inArray(b.toLowerCase(),this.countries)>-1},countries:["afghanistan","albania","algeria","american samoa","andorra","angola","anguilla","antarctica","antigua and barbuda","argentina","armenia","aruba","australia","austria","azerbaijan","bahamas","bahrain","bangladesh","barbados","belarus","belgium","belize","benin","bermuda","bhutan","bolivia","bonaire","bosnia and herzegovina","botswana","bouvet island","brazil","british indian ocean territory","brunei darussalam","bulgaria","burkina faso","burundi","cabo verde","cambodia","cameroon","canada","cayman islands","central african republic","chad","chile","china","christmas island","cocos islands","colombia","comoros","democratic republic of the congo","congo","cook islands","costa rica","côte d'ivoire","croatia","cuba","curaçao","cyprus","czechia","denmark","djibouti","dominica","dominican republic","ecuador","egypt","el salvador","equatorial guinea","eritrea","estonia","ethiopia","falkland islands","faroe islands","fiji","finland","france","french guiana","french polynesia","french southern territories","gabon","gambia","georgia","germany","ghana","gibraltar","greece","greenland","grenada","guadeloupe","guam","guatemala","guernsey","guinea","guinea-bissau","guyana","haiti","heard island and mcdonald islands","honduras","hong kong","hungary","iceland","india","indonesia","iran","iraq","ireland","isle of man","israel","italy","jamaica","japan","jersey","jordan","kazakhstan","kenya","kiribati","north korea","south korea","kuwait","kyrgyzstan","laos","latvia","lebanon","lesotho","liberia","libya","liechtenstein","lithuania","luxembourg","macao","macedonia","madagascar","malawi","malaysia","maldives","mali","malta","marshall islands","martinique","mauritania","mauritius","mayotte","mexico","micronesia","moldova","monaco","mongolia","montenegro","montserrat","morocco","mozambique","myanmar","namibia","nauru","nepal","netherlands","new caledonia","new zealand","nicaragua","niger","nigeria","niue","norfolk island","northern mariana islands","norway","oman","pakistan","palau","palestine","panama","papua new guinea","paraguay","peru","philippines","pitcairn","poland","portugal","puerto rico","qatar","réunion","romania","russia","rwanda","saint barthélemy","saint helena","ascension and tristan da cunha","Ascension and tristan da cunha","saint kitts and nevis","saint lucia","saint martin","saint pierre and miquelon","saint vincent and the grenadines","samoa","san marino","sao tome and principe","saudi arabia","senegal","serbia","seychelles","sierra leone","singapore","sint maarten","slovakia","slovenia","solomon islands","somalia","south africa","south georgia and the south sandwich islands","south sudan","spain","sri lanka","sudan","suriname","svalbard and jan mayen","swaziland","sweden","switzerland","syria","taiwan","tajikistan","tanzania","thailand","timor-leste","togo","tokelau","tonga","trinidad and tobago","tunisia","turkey","turkmenistan","turks and caicos islands","tuvalu","uganda","ukraine","united arab emirates","united kingdom","united states minor outlying islands","united states","uruguay","uzbekistan","vanuatu","venezuela","vatican city","vietnam","virgin islands (british)","virgin islands (us)","wallis and futuna","western sahara","yemen","zambia","zimbabwe","åland islands"],errorMessage:"",errorMessageKey:"badCustomVal"}),a.formUtils.addValidator({name:"federatestate",validatorFunction:function(b){return a.inArray(b.toLowerCase(),this.states)>-1},states:["alabama","alaska","arizona","arkansas","california","colorado","connecticut","delaware","florida","georgia","hawaii","idaho","illinois","indiana","iowa","kansas","kentucky","louisiana","maine","maryland","district of columbia","massachusetts","michigan","minnesota","mississippi","missouri","montana","nebraska","nevada","new hampshire","new jersey","new mexico","new york","north carolina","north dakota","ohio","oklahoma","oregon","pennsylvania","rhode island","south carolina","south dakota","tennessee","texas","utah","vermont","virginia","washington","west virginia","wisconsin","wyoming"],errorMessage:"",errorMessageKey:"badCustomVal"}),a.formUtils.addValidator({name:"longlat",validatorFunction:function(a){var b=/^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/;return b.test(a)},errorMessage:"",errorMessageKey:"badCustomVal"});var b=function(b){var c=[];return a.each(b,function(a,b){c.push(b.substr(0,1).toUpperCase()+b.substr(1,b.length))}),c.sort(),c};a.fn.suggestCountry=function(c){var d=b(a.formUtils.validators.validate_country.countries),e=a.inArray(d,"Usa");return d[e]="USA",a.formUtils.suggest(this,d,c)},a.fn.suggestState=function(c){var d=b(a.formUtils.validators.validate_federatestate.states);return a.formUtils.suggest(this,d,c)}}(a)}); \ No newline at end of file diff --git a/form-validator/logic.js b/form-validator/logic.js new file mode 100644 index 0000000..3656f0c --- /dev/null +++ b/form-validator/logic.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){"use strict";a.formUtils.registerLoadedModule("logic");var b=function(b,c){var d=function(){var c=a(this),d=c.valAttr("depends-on")||c.valAttr("if-checked");if(d){var f=a.formUtils.getValue('[name="'+d+'"]',b),g=a.split(c.valAttr("depends-on-value"),!1,!1),h=!f||g.length&&!e(f,g);h&&c.valAttr("skipped","1")}},e=function(b,c){var d=!1,e=b.toLocaleLowerCase();return a.each(c,function(a,b){if(e===b.toLocaleLowerCase())return d=!0,!1}),d},f=function(){var b=a(this),d=a.formUtils.getValue(b),e=b.valAttr("depending-value");a.each(this.dependingInputs,function(b,f){var g=!!a.formUtils.getValue(f),h=!d||e&&e!==d;h&&!g&&a.formUtils.dialogs.removeInputStylingAndMessage(f,c)})};b.find("[data-validation-depends-on]").off("beforeValidation",d).on("beforeValidation",d).each(function(){var c=a(this);b.find('[name="'+c.valAttr("depends-on")+'"]').each(function(){a(this).off("change",f).on("change",f).valAttr("depending-value",c.valAttr("depends-on-value")),this.dependingInputs=this.dependingInputs||[],this.dependingInputs.push(c)})})},c=function(b,c){var d=function(){var c=a(this),d=c.valAttr("optional-if-answered"),e=!1,f=!!a.formUtils.getValue(c);f||(a.each(a.split(d),function(c,d){var f=b.find('[name="'+d+'"]');if(e=!!a.formUtils.getValue(f))return!1}),e&&c.valAttr("skipped",1))},e=function(){var d=a(this),e=d.valAttr("optional-if-answered");a.each(a.split(e),function(d,e){var f=b.find('[name="'+e+'"]'),g=!!a.formUtils.getValue(f);g||a.formUtils.dialogs.removeInputStylingAndMessage(f,c)})};b.find("[data-validation-optional-if-answered]").off("beforeValidation",d).on("beforeValidation",d).each(function(){a(this).off("change",e).on("change",e)})};a.formUtils.$win.bind("validatorsLoaded formValidationSetup",function(d,e,f){e||(e=a("form")),b(e,f),c(e,f)})}(a)}); \ No newline at end of file diff --git a/form-validator/poland.js b/form-validator/poland.js new file mode 100644 index 0000000..e66f470 --- /dev/null +++ b/form-validator/poland.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.formUtils.registerLoadedModule("poland"),a.formUtils.addValidator({name:"plpesel",validatorFunction:function(a){var b=[1,3,7,9,1,3,7,9,1,3],c=0,d=0;if(/\d{11}/.test(a)&&11===a.length){for(var e=0;e<10;e++)c+=a[e]*b[e];if(c%10!==0&&(d=10-c%10),parseInt(a.charAt(10))===d)return!0}return!1},errorMessage:"",errorMessageKey:"badPlPesel"}),a.formUtils.addValidator({name:"plnip",validatorFunction:function(a){var b=[6,5,7,2,3,4,5,6,7],c=0;if(/\d{10}/.test(a)&&10===a.length){for(var d=0;d<9;d++)c+=a[d]*b[d];if(parseInt(a.charAt(9))===c%11)return!0}return!1},errorMessage:"",errorMessageKey:"badPlNip"}),a.formUtils.addValidator({name:"plregon",validatorFunction:function(a){var b=[8,9,2,3,4,5,6,7],c=[2,4,8,5,0,9,7,3,6,1,2,4,8],d=0,e=0;if(/(\d{14}|\d{9})/.test(a)&&(9===a.length||14===a.length)){for(var f=0;f<8;f++)d+=a[f]*b[f];if(d%11!==10&&(e=d%11),parseInt(a.charAt(8))===e){if(14!==a.length)return!0;for(d=0,f=0;f<13;f++)d+=a[f]*c[f];if(d%11!==10&&(e=d%11),parseInt(a.charAt(13))===e)return!0}}return!1},errorMessage:"",errorMessageKey:"badPlRegon"})}(a)}); \ No newline at end of file diff --git a/form-validator/sanitize.dev.js b/form-validator/sanitize.dev.js deleted file mode 100644 index 0835a20..0000000 --- a/form-validator/sanitize.dev.js +++ /dev/null @@ -1,136 +0,0 @@ -/** - * jQuery Form Validator Module: sanitize - * ------------------------------------------ - * Created by Victor Jonsson - * - * This module makes it possible to add sanitation functions to - * inputs. The functions is triggered on blur. Example: - * - * - * - * Available functions are: - * - uppercase - * - lowercase - * - capitalize - * - trim - * - trimLeft - * - trimRight - * - numberFormat - * - insertLeft - * - insertRight - * - escape (replace <, >, &, ' and " with HTML entities) - * - * @website http://formvalidator.net/ - * @license MIT - * @version 2.2.83 - */ -(function($, window) { - - 'use strict'; - - var inputsThatCantBeSanitized = '[type="button"], [type="submit"], [type="radio"], [type="checkbox"], [type="reset"], [type="search"]', - sanitizeCommands = { - upper : function(val) { - return val.toLocaleUpperCase(); - }, - lower : function(val) { - return val.toLocaleLowerCase(); - }, - trim : function(val) { - return $.trim(val); - }, - trimLeft : function(val) { - return val.replace(/^\s+/,''); - }, - trimRight : function(val) { - return val.replace(/\s+$/,''); - }, - capitalize : function(val) { - var words = val.split(' '); - $.each(words, function(i, word) { - words[i] = word.substr(0,1).toUpperCase() + word.substr(1, word.length); - }); - return words.join(' '); - }, - insert : function(val, $input, pos) { - var extra = ($input.attr('data-sanitize-insert-'+pos) || '').replace(/\[SPACE\]/g, ' '); - if ( (pos === 'left' && val.indexOf(extra) === 0) || (pos === 'right' && val.substring(val.length - extra.length) === extra)) { - return val; - } - return (pos === 'left' ? extra:'') + val + (pos === 'right' ? extra : ''); - }, - insertRight : function(val, $input) { - return this.insert(val, $input, 'right'); - }, - insertLeft : function(val, $input) { - return this.insert(val, $input, 'left'); - }, - numberFormat : function(val, $input) { - if ( 'numeral' in window ) { - val = numeral(val).format( $input.attr('data-sanitize-number-format') ); - } - else { - throw new Error('Using sanitation function "numberFormat" requires that you include numeraljs (http://http://numeraljs.com/)'); - } - return val; - }, - escape : function(val) { - var symbols = { - '<' : '__%AMP%__lt;', - '>' : '__%AMP%__gt;', - '&' : '__%AMP%__amp;', - '\'': '__%AMP%__#8217;', - '"' : '__%AMP%__quot;' - }; - $.each(symbols, function(symbol, replacement) { - val = val.replace(new RegExp(symbol, 'g'), replacement); - }); - return val.replace(new RegExp('__\%AMP\%__', 'g'), '&'); - } - }, - setupSanitation = function(evt, $forms, config) { - - if ( !$forms ) { - $forms = $('form'); - } - if ( !$forms.each ) { - $forms = $($forms); - } - - var execSanitationCommands = function() { - var $input = $(this), - value = $input.val(); - $.split($input.attr('data-sanitize'), function(command) { - if ( command in sanitizeCommands ) { - value = sanitizeCommands[command](value, $input, config); - } - else { - throw new Error('Use of unknown sanitize command "'+command+'"'); - } - }); - $input - .val(value) - .trigger('keyup.validation'); // we need to re-validate in case it gets validated on blur - }; - - $forms.each(function() { - var $form = $(this); - if( config.sanitizeAll ) { - $form.find('input,textarea').not(inputsThatCantBeSanitized).each(function() { - $(this).attr('data-sanitize', config.sanitizeAll+ ' '+ ($(this).attr('data-sanitize') || '')); - }); - } - - $form.find('[data-sanitize]') - .unbind('blur', execSanitationCommands) - .bind('blur', execSanitationCommands); - - }); - }; - - $(window).on('validatorsLoaded formValidationSetup', setupSanitation); - - // Only for unit testing - $.formUtils.setupSanitation = setupSanitation; - -})(jQuery, window); diff --git a/form-validator/sanitize.js b/form-validator/sanitize.js index c034190..3bfc959 100644 --- a/form-validator/sanitize.js +++ b/form-validator/sanitize.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a,b){"use strict";var c='[type="button"], [type="submit"], [type="radio"], [type="checkbox"], [type="reset"], [type="search"]',d={upper:function(a){return a.toLocaleUpperCase()},lower:function(a){return a.toLocaleLowerCase()},trim:function(b){return a.trim(b)},trimLeft:function(a){return a.replace(/^\s+/,"")},trimRight:function(a){return a.replace(/\s+$/,"")},capitalize:function(b){var c=b.split(" ");return a.each(c,function(a,b){c[a]=b.substr(0,1).toUpperCase()+b.substr(1,b.length)}),c.join(" ")},insert:function(a,b,c){var d=(b.attr("data-sanitize-insert-"+c)||"").replace(/\[SPACE\]/g," ");return"left"===c&&0===a.indexOf(d)||"right"===c&&a.substring(a.length-d.length)===d?a:("left"===c?d:"")+a+("right"===c?d:"")},insertRight:function(a,b){return this.insert(a,b,"right")},insertLeft:function(a,b){return this.insert(a,b,"left")},numberFormat:function(a,c){if(!("numeral"in b))throw new Error('Using sanitation function "numberFormat" requires that you include numeraljs (http://http://numeraljs.com/)');return a=numeral(a).format(c.attr("data-sanitize-number-format"))},escape:function(b){var c={"<":"__%AMP%__lt;",">":"__%AMP%__gt;","&":"__%AMP%__amp;","'":"__%AMP%__#8217;",'"':"__%AMP%__quot;"};return a.each(c,function(a,c){b=b.replace(new RegExp(a,"g"),c)}),b.replace(new RegExp("__%AMP%__","g"),"&")}},e=function(b,e,f){e||(e=a("form")),e.each||(e=a(e));var g=function(){var b=a(this),c=b.val();a.split(b.attr("data-sanitize"),function(a){if(!(a in d))throw new Error('Use of unknown sanitize command "'+a+'"');c=d[a](c,b,f)}),b.val(c).trigger("keyup.validation")};e.each(function(){var b=a(this);f.sanitizeAll&&b.find("input,textarea").not(c).each(function(){a(this).attr("data-sanitize",f.sanitizeAll+" "+(a(this).attr("data-sanitize")||""))}),b.find("[data-sanitize]").unbind("blur",g).bind("blur",g)})};a(b).on("validatorsLoaded formValidationSetup",e),a.formUtils.setupSanitation=e}(jQuery,window); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.addSanitizer({name:"upper",sanitizerFunction:function(a){return a.toLocaleUpperCase()}}),a.formUtils.addSanitizer({name:"lower",sanitizerFunction:function(a){return a.toLocaleLowerCase()}}),a.formUtils.addSanitizer({name:"trim",sanitizerFunction:function(b){return a.trim(b)}}),a.formUtils.addSanitizer({name:"trimLeft",sanitizerFunction:function(a){return a.replace(/^\s+/,"")}}),a.formUtils.addSanitizer({name:"trimRight",sanitizerFunction:function(a){return a.replace(/\s+$/,"")}}),a.formUtils.addSanitizer({name:"capitalize",sanitizerFunction:function(b){var c=b.split(" ");return a.each(c,function(a,b){c[a]=b.substr(0,1).toUpperCase()+b.substr(1,b.length)}),c.join(" ")}}),a.formUtils.addSanitizer({name:"insert",sanitizerFunction:function(a,b,c){var d=(b.attr("data-sanitize-insert-"+c)||"").replace(/\[SPACE\]/g," ");return"left"===c&&0===a.indexOf(d)||"right"===c&&a.substring(a.length-d.length)===d?a:("left"===c?d:"")+a+("right"===c?d:"")}}),a.formUtils.addSanitizer({name:"insertRight",sanitizerFunction:function(b,c){return a.formUtils.sanitizers.insert.sanitizerFunction(b,c,"right")}}),a.formUtils.addSanitizer({name:"insertLeft",sanitizerFunction:function(b,c){return a.formUtils.sanitizers.insert.sanitizerFunction(b,c,"left")}}),a.formUtils.addSanitizer({name:"numberFormat",sanitizerFunction:function(a,c){if(0===a.length)return a;if(!("numeral"in b))throw new ReferenceError('Using sanitation function "numberFormat" requires that you include numeral.js (http://numeraljs.com/)');return a=numeral().unformat(a),a=numeral(a).format(c.attr("data-sanitize-number-format"))}}),a.formUtils.addSanitizer({name:"strip",sanitizerFunction:function(b,c){var d=c.attr("data-sanitize-strip")||"";return a.split(d,function(c){var d=new RegExp(a.isNumeric(c)?c:"\\"+c,"g");b=b.replace(d,"")}),b}}),a.formUtils.addSanitizer({name:"escape",sanitizerFunction:function(b,c){var d=c.valAttr("is-escaped"),e={"<":"__%AMP%__lt;",">":"__%AMP%__gt;","&":"__%AMP%__amp;","'":"__%AMP%__#8217;",'"':"__%AMP%__quot;"};return"yes"===d?b:(c.valAttr("is-escaped","yes"),c.one("keyup",function(a){9!==a.keyCode&&c.valAttr("is-escaped","no")}),a.each(e,function(a,c){b=b.replace(new RegExp(a,"g"),c)}),b.replace(new RegExp("__%AMP%__","g"),"&"))}}),a.formUtils.registerLoadedModule("sanitize");var c='[type="button"], [type="submit"], [type="radio"], [type="checkbox"], [type="reset"], [type="search"]',d=function(b,d,e){d||(d=a("form")),d.each||(d=a(d));var f=function(){var b=a(this),c=b.val();a.split(b.attr("data-sanitize"),function(d){var f=a.formUtils.sanitizers[d];if(!f)throw new Error('Use of unknown sanitize command "'+d+'"');c=f.sanitizerFunction(c,b,e)}),b.val(c).trigger("keyup.validation")};d.each(function(){var b=a(this);e.sanitizeAll&&b.find("input,textarea").not(c).each(function(){var b=a(this),c=b.attr("data-sanitize")||"";b.attr("data-sanitize",e.sanitizeAll+" "+c)}),b.find("[data-sanitize]").unbind("blur.sanitation",f).bind("blur.sanitation",f),a(function(){b.trigger("blur.sanitation")})})};a(b).on("validatorsLoaded formValidationSetup",d),a.formUtils.setupSanitation=d}(a,window)}); \ No newline at end of file diff --git a/form-validator/security.dev.js b/form-validator/security.dev.js deleted file mode 100644 index 80e9a2c..0000000 --- a/form-validator/security.dev.js +++ /dev/null @@ -1,513 +0,0 @@ -/** - * jQuery Form Validator Module: Security - * ------------------------------------------ - * Created by Victor Jonsson - * - * This module adds validators typically used in registration forms. - * This module adds the following validators: - * - spamcheck - * - confirmation - * - strength - * - backend - * - credit card - * - cvv - * - * @website http://formvalidator.net/#security-validators - * @license MIT - * @version 2.2.83 - */ -(function($, window) { - - 'use strict'; - - /* - * Simple spam check - */ - $.formUtils.addValidator({ - name : 'spamcheck', - validatorFunction : function(val, $el) { - var attr = $el.valAttr('captcha'); - return attr === val; - }, - errorMessage : '', - errorMessageKey: 'badSecurityAnswer' - }); - - - /* - * Validate confirmation - */ - $.formUtils.addValidator({ - name : 'confirmation', - validatorFunction : function(value, $el, config, language, $form) { - var conf = '', - confInputName = $el.valAttr('confirm') || ($el.attr('name') + '_confirmation'), - confInput = $form.find('[name="' +confInputName+ '"]').eq(0); - - if (confInput) { - conf = confInput.val(); - } else { - alert('Could not find an input with name "'+confInputName+'"'); - } - - return value === conf; - }, - errorMessage : '', - errorMessageKey: 'notConfirmed' - }); - - var creditCards = { - 'amex' : [15,15], - 'diners_club' : [14,14], - 'cjb' : [16,16], - 'laser' : [16,19], - 'visa' : [16,16], - 'mastercard' : [16,16], - 'maestro' : [12,19], - 'discover' : [16,16] - }, - checkOnlyAmex = false, - allowsAmex = false; - - /* - * Credit card - */ - $.formUtils.addValidator({ - name : 'creditcard', - validatorFunction : function(value, $el) { - var allowing = $.split( $el.valAttr('allowing') || '' ); - - // Setup for cvv validation - allowsAmex = $.inArray('amex', allowing) > -1; - checkOnlyAmex = allowsAmex && allowing.length === 1; - - // Correct length - if( allowing.length > 0 ) { - var hasValidLength = false; - $.each(allowing, function(i, cardName) { - if( cardName in creditCards) { - if( value.length >= creditCards[cardName][0] && value.length <= creditCards[cardName][1]) { - hasValidLength = true; - return false; - } - } else if( window.console ) { - console.warn('Use of unknown credit card "'+cardName+'"'); - } - }); - - if ( !hasValidLength ) { - return false; - } - } - - // only numbers - if ( value.replace(new RegExp('[0-9]', 'g'), '') !== '' ) { - return false; - } - - // http://en.wikipedia.org/wiki/Luhn_algorithm - // http://www.brainjar.com/js/validation/default2.asp - var checkSum = 0; - $.each(value.split('').reverse(), function(i, digit) { - digit = parseInt(digit, 10); - if( i%2 === 0 ) { - checkSum += digit; - } else { - digit *= 2; - if (digit < 10) { - checkSum += digit; - } else { - checkSum += digit - 9; - } - } - }); - return checkSum % 10 === 0; - }, - errorMessage : '', - errorMessageKey: 'badCreditCard' - }); - - - /* - * Credit card number - */ - $.formUtils.addValidator({ - name : 'cvv', - validatorFunction : function(val) { - if( val.replace(/[0-9]/g, '') === '' ) { - val = val + ''; - if( checkOnlyAmex ) { - return val.length === 4; - } else if( allowsAmex ) { - return val.length === 3 || val.length === 4; - } else { - return val.length === 3; - } - } - return false; - }, - errorMessage : '', - errorMessageKey: 'badCVV' - }); - - /* - * Validate password strength - */ - $.formUtils.addValidator({ - name : 'strength', - validatorFunction : function(val, $el) { - var requiredStrength = $el.valAttr('strength') || 2; - if (requiredStrength && requiredStrength > 3) { - requiredStrength = 3; - } - - return $.formUtils.validators.validate_strength.calculatePasswordStrength(val) >= requiredStrength; - }, - errorMessage : '', - errorMessageKey: 'badStrength', - - /** - * Code more or less borrowed from jQuery plugin "Password Strength Meter" - * written by Darren Mason (djmason9@gmail.com), myPocket technologies (www.mypocket-technologies.com) - * @param {String} password - * @return {Number} - */ - calculatePasswordStrength : function(password) { - - if (password.length < 4) { - return 0; - } - - var score = 0; - - var checkRepetition = function (pLen, str) { - var res = ''; - for (var i = 0; i < str.length; i++) { - var repeated = true; - - for (var j = 0; j < pLen && (j + i + pLen) < str.length; j++) { - repeated = repeated && (str.charAt(j + i) === str.charAt(j + i + pLen)); - } - if (j < pLen) { - repeated = false; - } - if (repeated) { - i += pLen - 1; - repeated = false; - } - else { - res += str.charAt(i); - } - } - return res; - }; - - //password length - score += password.length * 4; - score += ( checkRepetition(1, password).length - password.length ) * 1; - score += ( checkRepetition(2, password).length - password.length ) * 1; - score += ( checkRepetition(3, password).length - password.length ) * 1; - score += ( checkRepetition(4, password).length - password.length ) * 1; - - //password has 3 numbers - if (password.match(/(.*[0-9].*[0-9].*[0-9])/)) { - score += 5; - } - - //password has 2 symbols - if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) { - score += 5; - } - - //password has Upper and Lower chars - if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) { - score += 10; - } - - //password has number and chars - if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) { - score += 15; - } - // - //password has number and symbol - if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/)) { - score += 15; - } - - //password has char and symbol - if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/)) { - score += 15; - } - - //password is just a numbers or chars - if (password.match(/^\w+$/) || password.match(/^\d+$/)) { - score -= 10; - } - - //verifying 0 < score < 100 - if (score < 0) { - score = 0; - } - if (score > 100) { - score = 100; - } - - if (score < 20) { - return 0; - } - else if (score < 40) { - return 1; - } - else if(score <= 60) { - return 2; - } - else { - return 3; - } - }, - - strengthDisplay : function($el, options) { - var config = { - fontSize: '12pt', - padding: '4px', - bad : 'Very bad', - weak : 'Weak', - good : 'Good', - strong : 'Strong' - }; - - if (options) { - $.extend(config, options); - } - - $el.bind('keyup', function() { - var val = $(this).val(), - $parent = typeof config.parent === 'undefined' ? $(this).parent() : $(config.parent), - $displayContainer = $parent.find('.strength-meter'), - strength = $.formUtils.validators.validate_strength.calculatePasswordStrength(val), - css = { - background: 'pink', - color : '#FF0000', - fontWeight : 'bold', - border : 'red solid 1px', - borderWidth : '0px 0px 4px', - display : 'inline-block', - fontSize : config.fontSize, - padding : config.padding - }, - text = config.bad; - - if($displayContainer.length === 0) { - $displayContainer = $(''); - $displayContainer - .addClass('strength-meter') - .appendTo($parent); - } - - if( !val ) { - $displayContainer.hide(); - } else { - $displayContainer.show(); - } - - if(strength === 1) { - text = config.weak; - } - else if(strength === 2) { - css.background = 'lightyellow'; - css.borderColor = 'yellow'; - css.color = 'goldenrod'; - text = config.good; - } - else if(strength >= 3) { - css.background = 'lightgreen'; - css.borderColor = 'darkgreen'; - css.color = 'darkgreen'; - text = config.strong; - } - - $displayContainer - .css(css) - .text(text); - }); - } - }); - - var requestServer = function(serverURL, $element, val, conf, callback) { - var reqParams = $element.valAttr('req-params') || $element.data('validation-req-params') || {}, - handleResponse = function(response, callback) { - if(response.valid) { - $element.valAttr('backend-valid', 'true'); - } - else { - $element.valAttr('backend-invalid', 'true'); - if (response.message) { - $element.attr(conf.validationErrorMsgAttribute, response.message); - } - } - - if( !$element.valAttr('has-keyup-event') ) { - $element - .valAttr('has-keyup-event', '1') - .bind('keyup change', function(evt) { - if( evt.keyCode !== 9 && evt.keyCode !== 16 ) { - $(this) - .valAttr('backend-valid', false) - .valAttr('backend-invalid', false); - } - }); - } - - callback(); - }; - - if ( !reqParams ) { - reqParams = {}; - } - if ( typeof reqParams === 'string' ) { - reqParams = $.parseJSON(reqParams); - } - reqParams[$element.valAttr('param-name') || $element.attr('name')] = val; - - $.ajax({ - url : serverURL, - type : 'POST', - cache : false, - data : reqParams, - dataType : 'json', - error : function(error) { - handleResponse({valid: false, message:'Connection failed with status: ' + error.statusText}, callback); - return false; - }, - success : function(response) { - handleResponse(response, callback); - } - }); - }, - disableFormSubmit = function() { - return false; - }; - - /* - * Server validation - * Flow (form submission): - * 1) Check if the value already has been validated on the server. If so, display the validation - * result and continue the validation process, otherwise continue to step 2 - * 2) Return false as if the value is invalid and set $.formUtils.haltValidation to true - * 3) Disable form submission on the form being validated - * 4) Request the server with value and input name and add class 'validating-server-side' to the form - * 5) When the server responds an attribute will be added to the element - * telling the validator that the input has a valid/invalid value and enable form submission - * 6) Run form submission again (back to step 1) - */ - $.formUtils.addValidator({ - name : 'server', - validatorFunction : function(val, $el, conf, lang, $form) { - - var backendValid = $el.valAttr('backend-valid'), - backendInvalid = $el.valAttr('backend-invalid'), - serverURL = document.location.href; - - if($el.valAttr('url')) { - serverURL = $el.valAttr('url'); - } else if('serverURL' in conf) { - serverURL = conf.backendUrl; - } - - if (backendValid) { - return true; - } - else if (backendInvalid) { - return false; - } - else if($.formUtils.eventType === 'keyup') { - return null; - } - - if ($.formUtils.isValidatingEntireForm) { - - $form - .bind('submit', disableFormSubmit) - .addClass('validating-server-side') - .addClass('on-blur'); - - $el.addClass('validating-server-side'); - $.formUtils.haltValidation = true; - - requestServer(serverURL, $el, val, conf, function() { - - $form - .removeClass('validating-server-side') - .removeClass('on-blur') - .get(0).onsubmit = function() {}; - - $form.unbind('submit', disableFormSubmit); - $el.removeClass('validating-server-side'); - - $el.valAttr('value-length', val.length); - - // fire submission again! - $.formUtils.haltValidation = false; - $form.trigger('submit'); - }); - - return null; - - } else { - // validaiton on blur - $form.addClass('validating-server-side'); - $el.addClass('validating-server-side'); - requestServer(serverURL, $el, val, conf, function() { - $form.removeClass('validating-server-side'); - $el.removeClass('validating-server-side'); - $el.trigger('blur'); - }); - return null; - } - }, - errorMessage : '', - errorMessageKey: 'badBackend', - validateOnKeyUp : false - }); - - - /* - * Check for only letters and numbers - * - * http://www.slovo.info/testuni.htm - */ - $.formUtils.addValidator({ - name : 'letternumeric', - validatorFunction : function(val, $el, config, language) { - var patternStart = '^([a-zA-Z0-9\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC', - patternEnd = ']+)$', - additionalChars = $el.valAttr('allowing'), - pattern = ''; - - if (additionalChars) { - pattern = patternStart + additionalChars + patternEnd; - var extra = additionalChars.replace(/\\/g, ''); - if (extra.indexOf(' ') > -1) { - extra = extra.replace(' ', ''); - extra += language.andSpaces || $.formUtils.LANG.andSpaces; - } - this.errorMessage = language.badAlphaNumeric + language.badAlphaNumericExtra + extra; - } else { - pattern = patternStart + patternEnd; - this.errorMessage = language.badAlphaNumeric; - } - - return new RegExp(pattern).test(val); - }, - errorMessage : '', - errorMessageKey: 'requiredFields' - }); - - - - $.fn.displayPasswordStrength = function(conf) { - new $.formUtils.validators.validate_strength.strengthDisplay(this, conf); - return this; - }; - -})(jQuery, window); diff --git a/form-validator/security.js b/form-validator/security.js index 40104be..c1fd315 100644 --- a/form-validator/security.js +++ b/form-validator/security.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a,b){"use strict";a.formUtils.addValidator({name:"spamcheck",validatorFunction:function(a,b){var c=b.valAttr("captcha");return c===a},errorMessage:"",errorMessageKey:"badSecurityAnswer"}),a.formUtils.addValidator({name:"confirmation",validatorFunction:function(a,b,c,d,e){var f="",g=b.valAttr("confirm")||b.attr("name")+"_confirmation",h=e.find('[name="'+g+'"]').eq(0);return h?f=h.val():alert('Could not find an input with name "'+g+'"'),a===f},errorMessage:"",errorMessageKey:"notConfirmed"});var c={amex:[15,15],diners_club:[14,14],cjb:[16,16],laser:[16,19],visa:[16,16],mastercard:[16,16],maestro:[12,19],discover:[16,16]},d=!1,e=!1;a.formUtils.addValidator({name:"creditcard",validatorFunction:function(f,g){var h=a.split(g.valAttr("allowing")||"");if(e=a.inArray("amex",h)>-1,d=e&&1===h.length,h.length>0){var i=!1;if(a.each(h,function(a,d){if(d in c){if(f.length>=c[d][0]&&f.length<=c[d][1])return i=!0,!1}else b.console&&console.warn('Use of unknown credit card "'+d+'"')}),!i)return!1}if(""!==f.replace(new RegExp("[0-9]","g"),""))return!1;var j=0;return a.each(f.split("").reverse(),function(a,b){b=parseInt(b,10),a%2===0?j+=b:(b*=2,j+=10>b?b:b-9)}),j%10===0},errorMessage:"",errorMessageKey:"badCreditCard"}),a.formUtils.addValidator({name:"cvv",validatorFunction:function(a){return""===a.replace(/[0-9]/g,"")?(a+="",d?4===a.length:e?3===a.length||4===a.length:3===a.length):!1},errorMessage:"",errorMessageKey:"badCVV"}),a.formUtils.addValidator({name:"strength",validatorFunction:function(b,c){var d=c.valAttr("strength")||2;return d&&d>3&&(d=3),a.formUtils.validators.validate_strength.calculatePasswordStrength(b)>=d},errorMessage:"",errorMessageKey:"badStrength",calculatePasswordStrength:function(a){if(a.length<4)return 0;var b=0,c=function(a,b){for(var c="",d=0;df&&f+d+af&&(e=!1),e?(d+=a-1,e=!1):c+=b.charAt(d)}return c};return b+=4*a.length,b+=1*(c(1,a).length-a.length),b+=1*(c(2,a).length-a.length),b+=1*(c(3,a).length-a.length),b+=1*(c(4,a).length-a.length),a.match(/(.*[0-9].*[0-9].*[0-9])/)&&(b+=5),a.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)&&(b+=5),a.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)&&(b+=10),a.match(/([a-zA-Z])/)&&a.match(/([0-9])/)&&(b+=15),a.match(/([!,@,#,$,%,^,&,*,?,_,~])/)&&a.match(/([0-9])/)&&(b+=15),a.match(/([!,@,#,$,%,^,&,*,?,_,~])/)&&a.match(/([a-zA-Z])/)&&(b+=15),(a.match(/^\w+$/)||a.match(/^\d+$/))&&(b-=10),0>b&&(b=0),b>100&&(b=100),20>b?0:40>b?1:60>=b?2:3},strengthDisplay:function(b,c){var d={fontSize:"12pt",padding:"4px",bad:"Very bad",weak:"Weak",good:"Good",strong:"Strong"};c&&a.extend(d,c),b.bind("keyup",function(){var b=a(this).val(),c="undefined"==typeof d.parent?a(this).parent():a(d.parent),e=c.find(".strength-meter"),f=a.formUtils.validators.validate_strength.calculatePasswordStrength(b),g={background:"pink",color:"#FF0000",fontWeight:"bold",border:"red solid 1px",borderWidth:"0px 0px 4px",display:"inline-block",fontSize:d.fontSize,padding:d.padding},h=d.bad;0===e.length&&(e=a(""),e.addClass("strength-meter").appendTo(c)),b?e.show():e.hide(),1===f?h=d.weak:2===f?(g.background="lightyellow",g.borderColor="yellow",g.color="goldenrod",h=d.good):f>=3&&(g.background="lightgreen",g.borderColor="darkgreen",g.color="darkgreen",h=d.strong),e.css(g).text(h)})}});var f=function(b,c,d,e,f){var g=c.valAttr("req-params")||c.data("validation-req-params")||{},h=function(b,d){b.valid?c.valAttr("backend-valid","true"):(c.valAttr("backend-invalid","true"),b.message&&c.attr(e.validationErrorMsgAttribute,b.message)),c.valAttr("has-keyup-event")||c.valAttr("has-keyup-event","1").bind("keyup change",function(b){9!==b.keyCode&&16!==b.keyCode&&a(this).valAttr("backend-valid",!1).valAttr("backend-invalid",!1)}),d()};g||(g={}),"string"==typeof g&&(g=a.parseJSON(g)),g[c.valAttr("param-name")||c.attr("name")]=d,a.ajax({url:b,type:"POST",cache:!1,data:g,dataType:"json",error:function(a){return h({valid:!1,message:"Connection failed with status: "+a.statusText},f),!1},success:function(a){h(a,f)}})},g=function(){return!1};a.formUtils.addValidator({name:"server",validatorFunction:function(b,c,d,e,h){var i=c.valAttr("backend-valid"),j=c.valAttr("backend-invalid"),k=document.location.href;return c.valAttr("url")?k=c.valAttr("url"):"serverURL"in d&&(k=d.backendUrl),i?!0:j?!1:"keyup"===a.formUtils.eventType?null:a.formUtils.isValidatingEntireForm?(h.bind("submit",g).addClass("validating-server-side").addClass("on-blur"),c.addClass("validating-server-side"),a.formUtils.haltValidation=!0,f(k,c,b,d,function(){h.removeClass("validating-server-side").removeClass("on-blur").get(0).onsubmit=function(){},h.unbind("submit",g),c.removeClass("validating-server-side"),c.valAttr("value-length",b.length),a.formUtils.haltValidation=!1,h.trigger("submit")}),null):(h.addClass("validating-server-side"),c.addClass("validating-server-side"),f(k,c,b,d,function(){h.removeClass("validating-server-side"),c.removeClass("validating-server-side"),c.trigger("blur")}),null)},errorMessage:"",errorMessageKey:"badBackend",validateOnKeyUp:!1}),a.formUtils.addValidator({name:"letternumeric",validatorFunction:function(b,c,d,e){var f="^([a-zA-Z0-9ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",g="]+)$",h=c.valAttr("allowing"),i="";if(h){i=f+h+g;var j=h.replace(/\\/g,"");j.indexOf(" ")>-1&&(j=j.replace(" ",""),j+=e.andSpaces||a.formUtils.LANG.andSpaces),this.errorMessage=e.badAlphaNumeric+e.badAlphaNumericExtra+j}else i=f+g,this.errorMessage=e.badAlphaNumeric;return new RegExp(i).test(b)},errorMessage:"",errorMessageKey:"requiredFields"}),a.fn.displayPasswordStrength=function(b){return new a.formUtils.validators.validate_strength.strengthDisplay(this,b),this}}(jQuery,window); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("security"),a.formUtils.addValidator({name:"spamcheck",validatorFunction:function(a,b){var c=b.valAttr("captcha");return c===a},errorMessage:"",errorMessageKey:"badSecurityAnswer"}),a.formUtils.addValidator({name:"confirmation",validatorFunction:function(b,c,d,e,f){var g,h=c.valAttr("confirm")||c.attr("name")+"_confirmation",i=f.find('[name="'+h+'"]');if(!i.length)return a.formUtils.warn('Password confirmation validator: could not find an input with name "'+h+'"',!0),!1;if(g=i.val(),d.validateOnBlur&&!i[0].hasValidationCallback){i[0].hasValidationCallback=!0;var j=function(){c.validate()};i.on("keyup",j),f.one("formValidationSetup",function(){i[0].hasValidationCallback=!1,i.off("keyup",j)})}return b===g},errorMessage:"",errorMessageKey:"notConfirmed"});var c={amex:[15,15],diners_club:[14,14],cjb:[16,16],laser:[16,19],visa:[16,16],mastercard:[16,16],maestro:[12,19],discover:[16,16]},d=!1,e=!1;a.formUtils.addValidator({name:"creditcard",validatorFunction:function(b,f){var g=a.split(f.valAttr("allowing")||"");if(e=a.inArray("amex",g)>-1,d=e&&1===g.length,g.length>0){var h=!1;if(a.each(g,function(d,e){if(e in c){if(b.length>=c[e][0]&&b.length<=c[e][1])return h=!0,!1}else a.formUtils.warn('Use of unknown credit card "'+e+'"',!0)}),!h)return!1}if(""!==b.replace(new RegExp("[0-9]","g"),""))return!1;var i=0;return a.each(b.split("").reverse(),function(a,b){b=parseInt(b,10),a%2===0?i+=b:(b*=2,i+=b<10?b:b-9)}),i%10===0},errorMessage:"",errorMessageKey:"badCreditCard"}),a.formUtils.addValidator({name:"cvv",validatorFunction:function(a){return""===a.replace(/[0-9]/g,"")&&(a+="",d?4===a.length:e?3===a.length||4===a.length:3===a.length)},errorMessage:"",errorMessageKey:"badCVV"}),a.formUtils.addValidator({name:"strength",validatorFunction:function(b,c){var d=c.valAttr("strength")||2;return d&&d>3&&(d=3),a.formUtils.validators.validate_strength.calculatePasswordStrength(b)>=d},errorMessage:"",errorMessageKey:"badStrength",calculatePasswordStrength:function(a){if(a.length<4)return 0;var b=0,c=function(a,b){for(var c="",d=0;d100&&(b=100),b<20?0:b<40?1:b<=60?2:3},strengthDisplay:function(b,c){var d={fontSize:"12pt",padding:"4px",bad:"Very bad",weak:"Weak",good:"Good",strong:"Strong"};c&&a.extend(d,c),b.bind("keyup",function(){var b=a(this).val(),c="undefined"==typeof d.parent?a(this).parent():a(d.parent),e=c.find(".strength-meter"),f=a.formUtils.validators.validate_strength.calculatePasswordStrength(b),g={background:"pink",color:"#FF0000",fontWeight:"bold",border:"red solid 1px",borderWidth:"0px 0px 4px",display:"inline-block",fontSize:d.fontSize,padding:d.padding},h=d.bad;0===e.length&&(e=a(""),e.addClass("strength-meter").appendTo(c)),b?e.show():e.hide(),1===f?h=d.weak:2===f?(g.background="lightyellow",g.borderColor="yellow",g.color="goldenrod",h=d.good):f>=3&&(g.background="lightgreen",g.borderColor="darkgreen",g.color="darkgreen",h=d.strong),e.css(g).text(h)})}});var f=function(b,c,d,e,f){var g=c.valAttr("req-params")||c.data("validation-req-params")||{},h=c.valAttr("param-name")||c.attr("name"),i=function(a,b){b(a)};if(!h)throw new Error("Missing input name used for http requests made by server validator");g||(g={}),"string"==typeof g&&(g=a.parseJSON(g)),g[h]=d,a.ajax({url:b,type:"POST",cache:!1,data:g,dataType:"json",error:function(a){return i({valid:!1,message:"Connection failed with status: "+a.statusText},f),!1},success:function(a){i(a,f)}})};a.formUtils.addAsyncValidator({name:"server",validatorFunction:function(a,b,c,d,e,g){var h=c.valAttr("url")||d.backendUrl||document.location.href;g.addClass("validating-server-side"),c.addClass("validating-server-side"),f(h,c,b,d,function(b){g.removeClass("validating-server-side"),c.removeClass("validating-server-side"),b.message&&c.attr(d.validationErrorMsgAttribute,b.message),a(b.valid)})},errorMessage:"",errorMessageKey:"badBackend"}),a.formUtils.addValidator({name:"letternumeric",validatorFunction:function(b,c,d,e){var f="^([a-zA-Z0-9ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",g="]+)$",h=c.valAttr("allowing"),i="";if(h){i=f+h+g;var j=h.replace(/\\/g,"");j.indexOf(" ")>-1&&(j=j.replace(" ",""),j+=e.andSpaces||a.formUtils.LANG.andSpaces),this.errorMessage=e.badAlphaNumeric+e.badAlphaNumericExtra+j}else i=f+g,this.errorMessage=e.badAlphaNumeric;return new RegExp(i).test(b)},errorMessage:"",errorMessageKey:"requiredFields"}),a.formUtils.addValidator({name:"complexity",validatorFunction:function(b,c,d,e){var f=c.valAttr("require-uc-letter")||"0",g=c.valAttr("require-lc-letter")||"0",h=c.valAttr("require-special-char")||"0",i=c.valAttr("require-numeral")||"0",j=c.valAttr("require-length")||"0",k={"uc-letter":{pattern:"^(?=(?:.*[A-Z]){"+f+",}).+",numRequired:f,dialogEnd:e.passwordComplexityUppercaseInfo},"lc-letter":{pattern:"^(?=(?:.*[a-z]){"+g+",}).+",numRequired:g,dialogEnd:e.passwordComplexityLowercaseInfo},"special-char":{pattern:"^(?=(?:.*(_|[!\"#$%&'()*+\\\\,-./:;<=>?@[\\]^_`{|}~])){"+h+",}).+",numRequired:h,dialogEnd:e.passwordComplexitySpecialCharsInfo},numeral:{pattern:"^(?=(?:.*\\d){"+i+",}).+",numRequired:i,dialogEnd:e.passwordComplexityNumericCharsInfo},length:{callback:function(a){return a.length>=j},numRequired:j,dialogEnd:e.lengthBadEnd}},l="";return a.each(k,function(a,d){var f=parseInt(d.numRequired,10);if(f){var g=new RegExp(d.pattern),h=!1;h=d.callback?d.callback(b):g.test(b),h?c.trigger("complexityRequirementValidation",[!0,a]):(""===l&&(l=e.passwordComplexityStart),l+=e.passwordComplexitySeparator+f+d.dialogEnd,c.trigger("complexityRequirementValidation",[!1,a]))}}),!l||(this.errorMessage=l+e.passwordComplexityEnd,!1)},errorMessage:"",errorMessageKey:""}),a.formUtils.addValidator({name:"recaptcha",validatorFunction:function(a,b){return""!==grecaptcha.getResponse(b.valAttr("recaptcha-widget-id"))},errorMessage:"",errorMessageKey:"badreCaptcha"}),a.fn.displayPasswordStrength=function(b){return new a.formUtils.validators.validate_strength.strengthDisplay(this,b),this};var g=function(b,c,d){if(c||(c=a("form")),"undefined"!=typeof grecaptcha&&!a.formUtils.hasLoadedGrecaptcha)throw new Error("reCaptcha API can not be loaded by hand, delete reCaptcha API snippet.");if(!a.formUtils.hasLoadedGrecaptcha&&a('[data-validation~="recaptcha"]',c).length){a.formUtils.hasLoadedGrecaptcha=!0;var e="//www.google.com/recaptcha/api.js?onload=reCaptchaLoaded&render=explicit"+(d.lang?"&hl="+d.lang:""),f=document.createElement("script");f.type="text/javascript",f.async=!0,f.defer=!0,f.src=e,document.getElementsByTagName("body")[0].appendChild(f)}};b.reCaptchaLoaded=function(b){b&&"object"==typeof b&&b.length||(b=a("form")),b.each(function(){var b=a(this),c=b.get(0).validationConfig||b.context.validationConfig||!1;c&&a('[data-validation~="recaptcha"]',b).each(function(){var d=a(this),e=document.createElement("DIV"),f=c.reCaptchaSiteKey||d.valAttr("recaptcha-sitekey"),g=c.reCaptchaTheme||d.valAttr("recaptcha-theme")||"light",h=c.reCaptchaSize||d.valAttr("recaptcha-size")||"normal",i=c.reCaptchaType||d.valAttr("recaptcha-type")||"image";if(!f)throw new Error("Google reCaptcha site key is required.");var j=grecaptcha.render(e,{sitekey:f,theme:g,size:h,type:i,callback:function(a){b.find('[data-validation~="recaptcha"]').trigger("validation",a&&""!==a)},"expired-callback":function(){b.find('[data-validation~="recaptcha"]').trigger("validation",!1)}});d.valAttr("recaptcha-widget-id",j).hide().on("beforeValidation",function(a){a.stopImmediatePropagation()}).parent().append(e)})})},a(b).on("validatorsLoaded formValidationSetup",g)}(a,window)}); \ No newline at end of file diff --git a/form-validator/sepa.js b/form-validator/sepa.js new file mode 100644 index 0000000..5b60f92 --- /dev/null +++ b/form-validator/sepa.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){"use strict";a.formUtils.registerLoadedModule("sepa");var b=[["AD",24,"F04F04A12"],["AE",23,"F03F16"],["AL",28,"F08A16"],["AT",20,"F05F11"],["AZ",28,"U04A20"],["BA",20,"F03F03F08F02"],["BE",16,"F03F07F02"],["BG",22,"U04F04F02A08"],["BH",22,"U04A14"],["BR",29,"F08F05F10U01A01"],["CH",21,"F05A12"],["CR",21,"F03F14"],["CY",28,"F03F05A16"],["CZ",24,"F04F06F10"],["DE",22,"F08F10"],["DK",18,"F04F09F01"],["DO",28,"U04F20"],["EE",20,"F02F02F11F01"],["ES",24,"F04F04F01F01F10"],["FI",18,"F06F07F01"],["FO",18,"F04F09F01"],["FR",27,"F05F05A11F02"],["GB",22,"U04F06F08"],["GE",22,"U02F16"],["GI",23,"U04A15"],["GL",18,"F04F09F01"],["GR",27,"F03F04A16"],["GT",28,"A04A20"],["HR",21,"F07F10"],["HU",28,"F03F04F01F15F01"],["IE",22,"U04F06F08"],["IL",23,"F03F03F13"],["IS",26,"F04F02F06F10"],["IT",27,"U01F05F05A12"],["KW",30,"U04A22"],["KZ",20,"F03A13"],["LB",28,"F04A20"],["LC",32,"U04F24"],["LI",21,"F05A12"],["LT",20,"F05F11"],["LU",20,"F03A13"],["LV",21,"U04A13"],["MC",27,"F05F05A11F02"],["MD",24,"U02A18"],["ME",22,"F03F13F02"],["MK",19,"F03A10F02"],["MR",27,"F05F05F11F02"],["MT",31,"U04F05A18"],["MU",30,"U04F02F02F12F03U03"],["NL",18,"U04F10"],["NO",15,"F04F06F01"],["PK",24,"U04A16"],["PL",28,"F08F16"],["PS",29,"U04A21"],["PT",25,"F04F04F11F02"],["RO",24,"U04A16"],["RS",22,"F03F13F02"],["SA",24,"F02A18"],["SE",24,"F03F16F01"],["SI",19,"F05F08F02"],["SK",24,"F04F06F10"],["SM",27,"U01F05F05A12"],["ST",25,"F08F11F02"],["TL",23,"F03F14F02"],["TN",24,"F02F03F13F02"],["TR",26,"F05F01A16"],["VG",24,"U04F16"],["XK",20,"F04F10F02"],["AO",25,"F21"],["BF",27,"F23"],["BI",16,"F12"],["BJ",28,"F24"],["CI",28,"U01F23"],["CM",27,"F23"],["CV",25,"F21"],["DZ",24,"F20"],["IR",26,"F22"],["JO",30,"A04F22"],["MG",27,"F23"],["ML",28,"U01F23"],["MZ",25,"F21"],["QA",29,"U04A21"],["SN",28,"U01F23"],["UA",29,"F25"]],c=function(a){a=a.replace(/\s+/g,""),a=a.substr(4)+a.substr(0,4),a=a.split("").map(function(a){var b=a.charCodeAt(0);return b>="A".charCodeAt(0)&&b<="Z".charCodeAt(0)?b-"A".charCodeAt(0)+10:a}).join("");for(var b,c=a;c.length>2;)b=c.slice(0,9),c=(parseInt(b,10)%97).toString()+c.slice(b.length);return parseInt(c,10)%97===1},d=function(a){a=a.toUpperCase(),a=a.replace(/\s+/g,"");var c=a.slice(0,2),d=0,e="";for(d=0;d - * - * This form validation module adds validators typically used on swedish - * websites. This module adds the following validators: - * - validate_swesec (Social security number) - * - validate_swemobile - * - validate_validate_municipality - * - validate_county - * - validate_swephone - * - * @website http://formvalidator.net/#swedish-validators - * @license MIT - * @version 2.2.83 - */ -(function($, window) { - - /* - * Validate swedish social security number yyyymmddXXXX - */ - $.formUtils.addValidator({ - name : 'swesec', - validatorFunction : function(securityNumber, $input) { - - var year, month, day, ssnParts; - - if( $input.valAttr('use-hyphen') ) { - ssnParts = securityNumber.split('-'); - if( ssnParts.length !== 2 ) { - return false; - } - securityNumber = ssnParts.join(''); - } - - if (!securityNumber.match(/^(\d{4})(\d{2})(\d{2})(\d{4})$/)) { - return false; - } - - year = RegExp.$1; - month = $.formUtils.parseDateInt(RegExp.$2); - day = $.formUtils.parseDateInt(RegExp.$3); - - window.ssnGender = ( parseInt( (RegExp.$4).substring(2,3) ) % 2 ) === 0 ? 'female':'male'; - - var months = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); - if (year % 400 === 0 || year % 4 === 0 && year % 100 !== 0) { - months[1] = 29; - } - if (month < 1 || month > 12 || day < 1 || day > months[month - 1]) { - return false; - } - - securityNumber = securityNumber.substring(2, securityNumber.length); - var check = ''; - for (var i = 0; i < securityNumber.length; i++) { - check += ((((i + 1) % 2) + 1)* securityNumber.substring(i, i + 1)); - } - var checksum = 0; - for (i = 0; i < check.length; i++) { - checksum += parseInt(check.substring(i, i + 1),10); - } - - return checksum % 10 === 0; - }, - errorMessage : '', - errorMessageKey: 'badSecurityNumber' - }); - - $.formUtils.addValidator({ - name : 'swecounty', - validatorFunction : function(str) { - str = str.toLowerCase(); - if($.inArray(str, this.counties) === -1) { - if(str.substr(-3).toLocaleLowerCase() !== 'län') { - return $.inArray(str + 's län', this.counties) > -1; - } - - return false; - } - else { - return true; - } - }, - errorMessage: '', - errorMessageKey: 'badCustomVal', - counties : ['stockholms län', - 'uppsala län', - 'södermanlands län', - 'östergötlands län', - 'jönköpings län', - 'kronobergs län', - 'kalmar län', - 'gotlands län', - 'blekinge län', - 'skåne län', - 'hallands län', - 'västra götalands län', - 'värmlands län', - 'örebro län', - 'västmanlands län', - 'dalarnas län', - 'gävleborgs län', - 'västernorrlands län', - 'jämtlands län', - 'västerbottens län', - 'norrbottens län'] - }); - - $.formUtils.addValidator({ - name : 'swemunicipality', - validatorFunction : function(str) { - str = str.toLowerCase(); - if ($.inArray(str, this.municipalities) === -1) { - - // First check (dont return) - if (str.substr(-8) === 's kommun') { - if ($.inArray( str.substr(0, str.length-8), this.municipalities ) > -1) { - return true; - } - } - - // Second check - if (str.substr(-7) === ' kommun') { - return $.inArray( str.substr(0, str.length-7), this.municipalities ) > -1; - } - - return false; - } - else { - return true; - } - }, - errorMessage : '', - errorMessageKey: 'badCustomVal', - municipalities : ['ale','alingsås','alvesta','aneby','arboga','arjeplog','arvidsjaur','arvika','askersund','avesta','bengtsfors','berg','bjurholm','bjuv','boden','bollebygd','bollnäs','borgholm','borlänge','borås','botkyrka','boxholm','bromölla','bräcke','burlöv','båstad','dals-ed','danderyd','degerfors','dorotea','eda','ekerö','eksjö','emmaboda','enköpings','eskilstuna','eslövs','essunga','fagersta','falkenberg','falköping','falu','filipstad','finspång','flen','forshaga','färgelanda','gagnef','gislaved','gnesta','gnosjö','gotland','grum','grästorp','gullspång','gällivare','gävle','göteborg','götene','habo','hagfor','hallsberg','hallstahammar','halmstad','hammarö','haninge','haparanda','heby','hedemora','helsingborg','herrljunga','hjo','hofor','huddinge','hudiksvall','hultsfred','hylte','håbo','hällefor','härjedalen','härnösand','härryda','hässleholm','höganäs','högsby','hörby','höör','jokkmokk','järfälla','jönköping','kalix','kalmar','karlsborg','karlshamn','karlskoga','karlskrona','karlstad','katrineholm','kil','kinda','kiruna','klippan','knivsta','kramfors','kristianstad','kristinehamn','krokoms','kumla','kungsbacka','kungsör','kungälv','kävlinge','köping','laholm','landskrona','laxå','lekeberg','leksand','lerum','lessebo','lidingö','lidköping','lilla edets','lindesbergs','linköpings','ljungby','ljusdals','ljusnarsbergs','lomma','ludvika','luleå','lunds','lycksele','lysekil','malmö','malung-sälen','malå','mariestad','marks','markaryd','mellerud','mjölby','mora','motala','mullsjö','munkedal','munkfors','mölndal','mönsterås','mörbylånga','nacka','nora','norberg','nordanstig','nordmaling','norrköping','norrtälje','norsjö','nybro','nykvarn','nyköping','nynäshamn','nässjö','ockelbo','olofström','orsa','orust','osby','oskarshamn','ovanåker','oxelösund','pajala','partille','perstorp','piteå','ragunda','robertsfors','ronneby','rättvik','sala','salem','sandviken','sigtuna','simrishamn','sjöbo','skara','skellefteå','skinnskatteberg','skurup','skövde','smedjebacken','sollefteå','sollentuna','solna','sorsele','sotenäs','staffanstorp','stenungsund','stockholm','storfors','storuman','strängnäs','strömstad','strömsund','sundbyberg','sundsvall','sunne','surahammar','svalöv','svedala','svenljunga','säffle','säter','sävsjö','söderhamns','söderköping','södertälje','sölvesborg','tanum','tibro','tidaholm','tierp','timrå','tingsryd','tjörn','tomelilla','torsby','torså','tranemo','tranå','trelleborg','trollhättan','trosa','tyresö','täby','töreboda','uddevalla','ulricehamns','umeå','upplands väsby','upplands-bro','uppsala','uppvidinge','vadstena','vaggeryd','valdemarsvik','vallentuna','vansbro','vara','varberg','vaxholm','vellinge','vetlanda','vilhelmina','vimmerby','vindeln','vingåker','vårgårda','vänersborg','vännäs','värmdö','värnamo','västervik','västerås','växjö','ydre','ystad','åmål','ånge','åre','årjäng','åsele','åstorp','åtvidaberg','älmhult','älvdalen','älvkarleby','älvsbyn','ängelholm','öckerö','ödeshög','örebro','örkelljunga','örnsköldsvik','östersund','österåker','östhammar','östra göinge','överkalix','övertorneå'] - }); - - - /* - * Validate phone number, at least 7 digits only one hyphen and plus allowed - */ - $.formUtils.addValidator({ - name : 'swephone', - validatorFunction : function(tele) { - var numPlus = tele.match(/\+/g); - var numHifen = tele.match(/-/g); - - if ((numPlus !== null && numPlus.length > 1) || (numHifen !== null && numHifen.length > 1)) { - return false; - } - if (numPlus !== null && tele.indexOf('+') !== 0) { - return false; - } - - tele = tele.replace(/([-|\+])/g, ''); - return tele.length > 8 && tele.match(/[^0-9]/g) === null; - }, - errorMessage : '', - errorMessageKey: 'badTelephone' - }); - - - /* - * Validate that string is a swedish telephone number - */ - $.formUtils.addValidator({ - name : 'swemobile', - validatorFunction : function(number) { - if (!$.formUtils.validators.validate_swephone.validatorFunction(number)) { - return false; - } - - number = number.replace(/[^0-9]/g, ''); - var begin = number.substring(0, 3); - - if (number.length !== 10 && begin !== '467') { - return false; - } else if (number.length !== 11 && begin === '467') { - return false; - } - return (/07[0-9{1}]/).test(begin) || begin === '467'; - }, - errorMessage : '', - errorMessageKey: 'badTelephone' - }); - - /** - * @private - * @param {Array} listItems - * @return {Array} - */ - var _makeSortedList = function(listItems) { - var newList = []; - $.each(listItems, function(i, v) { - newList.push(v.substr(0,1).toUpperCase() + v.substr(1, v.length)); - }); - newList.sort(); - return newList; - }; - - $.fn.suggestSwedishCounty = function(settings) { - var counties = _makeSortedList($.formUtils.validators.validate_swecounty.counties); - return $.formUtils.suggest(this, counties, settings); - }; - - $.fn.suggestSwedishMunicipality = function(settings) { - var municipalities = _makeSortedList($.formUtils.validators.validate_swemunicipality.municipalities); - return $.formUtils.suggest(this, municipalities, settings); - }; - -})(jQuery, window); diff --git a/form-validator/sweden.js b/form-validator/sweden.js index 0d8f045..d4a367b 100644 --- a/form-validator/sweden.js +++ b/form-validator/sweden.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a,b){a.formUtils.addValidator({name:"swesec",validatorFunction:function(c,d){var e,f,g,h;if(d.valAttr("use-hyphen")){if(h=c.split("-"),2!==h.length)return!1;c=h.join("")}if(!c.match(/^(\d{4})(\d{2})(\d{2})(\d{4})$/))return!1;e=RegExp.$1,f=a.formUtils.parseDateInt(RegExp.$2),g=a.formUtils.parseDateInt(RegExp.$3),b.ssnGender=parseInt(RegExp.$4.substring(2,3))%2===0?"female":"male";var i=new Array(31,28,31,30,31,30,31,31,30,31,30,31);if((e%400===0||e%4===0&&e%100!==0)&&(i[1]=29),1>f||f>12||1>g||g>i[f-1])return!1;c=c.substring(2,c.length);for(var j="",k=0;k-1:!1:!0},errorMessage:"",errorMessageKey:"badCustomVal",counties:["stockholms län","uppsala län","södermanlands län","östergötlands län","jönköpings län","kronobergs län","kalmar län","gotlands län","blekinge län","skåne län","hallands län","västra götalands län","värmlands län","örebro län","västmanlands län","dalarnas län","gävleborgs län","västernorrlands län","jämtlands län","västerbottens län","norrbottens län"]}),a.formUtils.addValidator({name:"swemunicipality",validatorFunction:function(b){return b=b.toLowerCase(),-1===a.inArray(b,this.municipalities)?"s kommun"===b.substr(-8)&&a.inArray(b.substr(0,b.length-8),this.municipalities)>-1?!0:" kommun"===b.substr(-7)?a.inArray(b.substr(0,b.length-7),this.municipalities)>-1:!1:!0},errorMessage:"",errorMessageKey:"badCustomVal",municipalities:["ale","alingsås","alvesta","aneby","arboga","arjeplog","arvidsjaur","arvika","askersund","avesta","bengtsfors","berg","bjurholm","bjuv","boden","bollebygd","bollnäs","borgholm","borlänge","borås","botkyrka","boxholm","bromölla","bräcke","burlöv","båstad","dals-ed","danderyd","degerfors","dorotea","eda","ekerö","eksjö","emmaboda","enköpings","eskilstuna","eslövs","essunga","fagersta","falkenberg","falköping","falu","filipstad","finspång","flen","forshaga","färgelanda","gagnef","gislaved","gnesta","gnosjö","gotland","grum","grästorp","gullspång","gällivare","gävle","göteborg","götene","habo","hagfor","hallsberg","hallstahammar","halmstad","hammarö","haninge","haparanda","heby","hedemora","helsingborg","herrljunga","hjo","hofor","huddinge","hudiksvall","hultsfred","hylte","håbo","hällefor","härjedalen","härnösand","härryda","hässleholm","höganäs","högsby","hörby","höör","jokkmokk","järfälla","jönköping","kalix","kalmar","karlsborg","karlshamn","karlskoga","karlskrona","karlstad","katrineholm","kil","kinda","kiruna","klippan","knivsta","kramfors","kristianstad","kristinehamn","krokoms","kumla","kungsbacka","kungsör","kungälv","kävlinge","köping","laholm","landskrona","laxå","lekeberg","leksand","lerum","lessebo","lidingö","lidköping","lilla edets","lindesbergs","linköpings","ljungby","ljusdals","ljusnarsbergs","lomma","ludvika","luleå","lunds","lycksele","lysekil","malmö","malung-sälen","malå","mariestad","marks","markaryd","mellerud","mjölby","mora","motala","mullsjö","munkedal","munkfors","mölndal","mönsterås","mörbylånga","nacka","nora","norberg","nordanstig","nordmaling","norrköping","norrtälje","norsjö","nybro","nykvarn","nyköping","nynäshamn","nässjö","ockelbo","olofström","orsa","orust","osby","oskarshamn","ovanåker","oxelösund","pajala","partille","perstorp","piteå","ragunda","robertsfors","ronneby","rättvik","sala","salem","sandviken","sigtuna","simrishamn","sjöbo","skara","skellefteå","skinnskatteberg","skurup","skövde","smedjebacken","sollefteå","sollentuna","solna","sorsele","sotenäs","staffanstorp","stenungsund","stockholm","storfors","storuman","strängnäs","strömstad","strömsund","sundbyberg","sundsvall","sunne","surahammar","svalöv","svedala","svenljunga","säffle","säter","sävsjö","söderhamns","söderköping","södertälje","sölvesborg","tanum","tibro","tidaholm","tierp","timrå","tingsryd","tjörn","tomelilla","torsby","torså","tranemo","tranå","trelleborg","trollhättan","trosa","tyresö","täby","töreboda","uddevalla","ulricehamns","umeå","upplands väsby","upplands-bro","uppsala","uppvidinge","vadstena","vaggeryd","valdemarsvik","vallentuna","vansbro","vara","varberg","vaxholm","vellinge","vetlanda","vilhelmina","vimmerby","vindeln","vingåker","vårgårda","vänersborg","vännäs","värmdö","värnamo","västervik","västerås","växjö","ydre","ystad","åmål","ånge","åre","årjäng","åsele","åstorp","åtvidaberg","älmhult","älvdalen","älvkarleby","älvsbyn","ängelholm","öckerö","ödeshög","örebro","örkelljunga","örnsköldsvik","östersund","österåker","östhammar","östra göinge","överkalix","övertorneå"]}),a.formUtils.addValidator({name:"swephone",validatorFunction:function(a){var b=a.match(/\+/g),c=a.match(/-/g);return null!==b&&b.length>1||null!==c&&c.length>1?!1:null!==b&&0!==a.indexOf("+")?!1:(a=a.replace(/([-|\+])/g,""),a.length>8&&null===a.match(/[^0-9]/g))},errorMessage:"",errorMessageKey:"badTelephone"}),a.formUtils.addValidator({name:"swemobile",validatorFunction:function(b){if(!a.formUtils.validators.validate_swephone.validatorFunction(b))return!1;b=b.replace(/[^0-9]/g,"");var c=b.substring(0,3);return 10!==b.length&&"467"!==c?!1:11!==b.length&&"467"===c?!1:/07[0-9{1}]/.test(c)||"467"===c},errorMessage:"",errorMessageKey:"badTelephone"});var c=function(b){var c=[];return a.each(b,function(a,b){c.push(b.substr(0,1).toUpperCase()+b.substr(1,b.length))}),c.sort(),c};a.fn.suggestSwedishCounty=function(b){var d=c(a.formUtils.validators.validate_swecounty.counties);return a.formUtils.suggest(this,d,b)},a.fn.suggestSwedishMunicipality=function(b){var d=c(a.formUtils.validators.validate_swemunicipality.municipalities);return a.formUtils.suggest(this,d,b)}}(jQuery,window); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){a.formUtils.registerLoadedModule("sweden"),a.formUtils.addValidator({name:"swesec",validatorFunction:function(c,d){var e,f,g,h;if(d.valAttr("use-hyphen")){if(h=c.split("-"),2!==h.length)return!1;c=h.join("")}if(!c.match(/^(\d{4})(\d{2})(\d{2})(\d{4})$/))return!1;e=RegExp.$1,f=a.formUtils.parseDateInt(RegExp.$2),g=a.formUtils.parseDateInt(RegExp.$3);var i=parseInt(RegExp.$4.substring(2,3))%2===0?"female":"male";d.trigger("genderDerived",[i]),b.ssnGender=i;var j=[31,28,31,30,31,30,31,31,30,31,30,31];if((e%400===0||e%4===0&&e%100!==0)&&(j[1]=29),f<1||f>12||g<1||g>j[f-1])return!1;c=c.substring(2,c.length);for(var k="",l=0;l-1},errorMessage:"",errorMessageKey:"badCustomVal",counties:["stockholms län","uppsala län","södermanlands län","östergötlands län","jönköpings län","kronobergs län","kalmar län","gotlands län","blekinge län","skåne län","hallands län","västra götalands län","värmlands län","örebro län","västmanlands län","dalarnas län","gävleborgs län","västernorrlands län","jämtlands län","västerbottens län","norrbottens län"]}),a.formUtils.addValidator({name:"swemunicipality",validatorFunction:function(b){return b=b.toLowerCase(),a.inArray(b,this.municipalities)!==-1||("s kommun"===b.substr(-8)&&a.inArray(b.substr(0,b.length-8),this.municipalities)>-1||" kommun"===b.substr(-7)&&a.inArray(b.substr(0,b.length-7),this.municipalities)>-1)},errorMessage:"",errorMessageKey:"badCustomVal",municipalities:["ale","alingsås","alvesta","aneby","arboga","arjeplog","arvidsjaur","arvika","askersund","avesta","bengtsfors","berg","bjurholm","bjuv","boden","bollebygd","bollnäs","borgholm","borlänge","borås","botkyrka","boxholm","bromölla","bräcke","burlöv","båstad","dals-ed","danderyd","degerfors","dorotea","eda","ekerö","eksjö","emmaboda","enköpings","eskilstuna","eslövs","essunga","fagersta","falkenberg","falköping","falu","filipstad","finspång","flen","forshaga","färgelanda","gagnef","gislaved","gnesta","gnosjö","gotland","grum","grästorp","gullspång","gällivare","gävle","göteborg","götene","habo","hagfor","hallsberg","hallstahammar","halmstad","hammarö","haninge","haparanda","heby","hedemora","helsingborg","herrljunga","hjo","hofor","huddinge","hudiksvall","hultsfred","hylte","håbo","hällefor","härjedalen","härnösand","härryda","hässleholm","höganäs","högsby","hörby","höör","jokkmokk","järfälla","jönköping","kalix","kalmar","karlsborg","karlshamn","karlskoga","karlskrona","karlstad","katrineholm","kil","kinda","kiruna","klippan","knivsta","kramfors","kristianstad","kristinehamn","krokoms","kumla","kungsbacka","kungsör","kungälv","kävlinge","köping","laholm","landskrona","laxå","lekeberg","leksand","lerum","lessebo","lidingö","lidköping","lilla edets","lindesbergs","linköpings","ljungby","ljusdals","ljusnarsbergs","lomma","ludvika","luleå","lunds","lycksele","lysekil","malmö","malung-sälen","malå","mariestad","marks","markaryd","mellerud","mjölby","mora","motala","mullsjö","munkedal","munkfors","mölndal","mönsterås","mörbylånga","nacka","nora","norberg","nordanstig","nordmaling","norrköping","norrtälje","norsjö","nybro","nykvarn","nyköping","nynäshamn","nässjö","ockelbo","olofström","orsa","orust","osby","oskarshamn","ovanåker","oxelösund","pajala","partille","perstorp","piteå","ragunda","robertsfors","ronneby","rättvik","sala","salem","sandviken","sigtuna","simrishamn","sjöbo","skara","skellefteå","skinnskatteberg","skurup","skövde","smedjebacken","sollefteå","sollentuna","solna","sorsele","sotenäs","staffanstorp","stenungsund","stockholm","storfors","storuman","strängnäs","strömstad","strömsund","sundbyberg","sundsvall","sunne","surahammar","svalöv","svedala","svenljunga","säffle","säter","sävsjö","söderhamns","söderköping","södertälje","sölvesborg","tanum","tibro","tidaholm","tierp","timrå","tingsryd","tjörn","tomelilla","torsby","torså","tranemo","tranå","trelleborg","trollhättan","trosa","tyresö","täby","töreboda","uddevalla","ulricehamns","umeå","upplands väsby","upplands-bro","uppsala","uppvidinge","vadstena","vaggeryd","valdemarsvik","vallentuna","vansbro","vara","varberg","vaxholm","vellinge","vetlanda","vilhelmina","vimmerby","vindeln","vingåker","vårgårda","vänersborg","vännäs","värmdö","värnamo","västervik","västerås","växjö","ydre","ystad","åmål","ånge","åre","årjäng","åsele","åstorp","åtvidaberg","älmhult","älvdalen","älvkarleby","älvsbyn","ängelholm","öckerö","ödeshög","örebro","örkelljunga","örnsköldsvik","östersund","österåker","östhammar","östra göinge","överkalix","övertorneå"]}),a.formUtils.addValidator({name:"swephone",validatorFunction:function(a){var b=a.match(/\+/g),c=a.match(/-/g);return!(null!==b&&b.length>1||null!==c&&c.length>1)&&((null===b||0===a.indexOf("+"))&&(a=a.replace(/([-|\+])/g,""),a.length>8&&null===a.match(/[^0-9]/g)))},errorMessage:"",errorMessageKey:"badTelephone"}),a.formUtils.addValidator({name:"swemobile",validatorFunction:function(b){if(!a.formUtils.validators.validate_swephone.validatorFunction(b))return!1;b=b.replace(/[^0-9]/g,"");var c=b.substring(0,3);return(10===b.length||"467"===c)&&((11===b.length||"467"!==c)&&(/07[0-9{1}]/.test(c)||"467"===c))},errorMessage:"",errorMessageKey:"badTelephone"});var c=function(b){var c=[];return a.each(b,function(a,b){c.push(b.substr(0,1).toUpperCase()+b.substr(1,b.length))}),c.sort(),c};a.fn.suggestSwedishCounty=function(b){var d=c(a.formUtils.validators.validate_swecounty.counties);return a.formUtils.suggest(this,d,b)},a.fn.suggestSwedishMunicipality=function(b){var d=c(a.formUtils.validators.validate_swemunicipality.municipalities);return a.formUtils.suggest(this,d,b)}}(a,window)}); \ No newline at end of file diff --git a/form-validator/theme-default.css b/form-validator/theme-default.css index 4f143c0..f0c5e5b 100644 --- a/form-validator/theme-default.css +++ b/form-validator/theme-default.css @@ -1,6 +1,5 @@ /** * Default CSS theme for jQuery-Form-Validator. - * @version 2.2.63 * @author Victor Jonsson */ @@ -20,7 +19,7 @@ input.error { select.valid, input.valid { border-color: #468847; - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAARCAYAAAA/mJfHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAYSmlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjarVllVBV/t94TJ6hDdx26pLu7QboVOHRzODQYoIAICmKggoKCiogKBiklJqKIKKhYhIgoKgaKinI/gP7f9733frhr3d+HWc888+y9n73XrJk18wMQFqDR6XEoB0B8QgrD3daC6uvnTyW9ABSEgAJrQJUWmkw3d3V1gv95IQBfRwEBALivTKPT4+D/tjjDwpNDARBXAAgJSw6NB0AuAuBCoXRGCgBhCACk0lPoKQCELwDAw/D18wcgkgGAJ3IFiwAAT8gKVgMAHoanuyUA0QqAzEqjMSIBKK4AQE0LjUwBoNABiFwJYdEJADx5AEST0ChaGIDQVQBYEx+fGAYgNA8A8iH/kify33KG/M1Jo0X+xSu9AAAA2So6mR5Hy4T/7xUfl/qnhiQAsEYx7NwBgAcAORmb6OgOAKwASGdCyFoXAOACQG5GhwGs4rGoVDuvVf1caLKlPwDwAaAQRrNyBAARAJQvNdbLfBVr0BgAK3p0bXSKvecqDmEkuq/mR9PCk609/uCocHun1ZyFCXFr/+CqiGgbewDgAEAvZkV5+qz4RK+mRXuvBQAKADqUHOvhuKp/nhVlufaPhpHq7gUA0gDolwiGjfuKBhOIT/7TF6YSSrP2AAABAMwsJcrTbiUW8w1P9nX64y0s3Mp6xQMWFp7gteoZS6GnWLivxhbQ41xX9VhVeJyt+8qcsabkNI8/scMpDM/VmWOTMTQH1xX/2Fd6iqvnijccByewBCugQipQIQQSIQaiB+da54C6esUGaMCASAgH5VXmT4QP0IABCUADD8iCd5AA4ZD8N84CaMCAcEiDBPj1l105KkME0IABaRAOyRALr4AB8bgQboIb4k64CW6Gm+AauB6u/yeOyv6nKtGaaEW0I9oQFf76CIVEiINEYED0f+f+iSS8ItwjTBJGCOOEx+AIcRAOqcCAcEj425k3vAQGRP85D4rewvgP51RwhnF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vc2hvcDpMYXllclRleHQ+YTwvcGhvdG9zaG9wOkxheWVyVGV4dD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOkJhZz4KICAgICAgICAgPC9waG90b3Nob3A6VGV4dExheWVycz4KICAgICAgICAgPHBob3Rvc2hvcDpDb2xvck1vZGU+MzwvcGhvdG9zaG9wOkNvbG9yTW9kZT4KICAgICAgICAgPHBob3Rvc2hvcDpJQ0NQcm9maWxlPkRpc3BsYXk8L3Bob3Rvc2hvcDpJQ0NQcm9maWxlPgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpYUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyMDAwMC8xMDAwMDwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT42NTUzNTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTk8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MTc8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/Pn/qNPoAAAAgY0hSTQAAbZgAAHOOAAD6zAAAhPoAAHmBAAD9EwAAMG0AABIpDR4mTgAAAMBJREFUeNrE1L0NwyAURtHrKAu4pPUKXsGs4AIGyGRQ2CM4K3gFt3TJCE5DgSL+7FgKEg0SB77HE82+71w1blw47mc3ais6YAGkUW47fbMA6n6Kqa1ogekbSmLaipe2ok9AC9AfeYAWmHycKqgUswOWAIxBbz8BaGJ9pq0IF1e/YYhA0ii3HmmNVKwxhHIxt8IB0ij3rK2ZDGtRAyUx39ExcExB2df09ZDB0sMoN+eyN6VfQ1sxAG0JqsL+9gV9BgBw6UeG/cRoQwAAAABJRU5ErkJggg=='); + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAgVBMVEUAAABetV5buFtcuFxcuVxdu11cuFxbuFtcuFxcuFxbtltcuFxbtltetl5cuFxct1xduV1fuF9cuFxcuFxbultcuFxduF1gtWBduV1cuFxcuVxcuFxcuFxcuFxet15dt11cuFxcuFxbt1teuF5duV1euF5cuVxcuFxcuFxcuFwAAADG3XcxAAAAKXRSTlMAJrDPRSnn1OjCKvM4MamLFivp8jvI1xgs6jpL++w5UvrxUU83RMe6MlhBCPsAAAABYktHRACIBR1IAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4AwTFzUBkZPjhwAAAHBJREFUGNNjYCAJMDIxsyDzWdk0NdmR+RyampqcCD4XiM/Nw8DLxy8A4gsKAfnCIgwMopqaYuIMDBIwPgOzJkhEQhLElwIplZYBMmWFQXw5iGHyCppgoCgHM14JLKLIg7BQGSiiqILsRFU1dQ3iPQgAPhMLEPHXqSUAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTYtMTItMTlUMjM6NTM6MDErMDE6MDCbiS6WAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE2LTEyLTE5VDIzOjUzOjAxKzAxOjAw6tSWKgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAASUVORK5CYII='); background-position: right 5px center; background-repeat: no-repeat; -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); @@ -60,8 +59,10 @@ span.help { /* Here you can style the look of the input while server being requested when using data-validation="server" */ -select.validating-server-side, -input.validating-server-side { +select.async-validation, +input.async-validation, +select.validating-server-side, /* deprecated */ +input.validating-server-side /* deprecated */ { opacity: 0.5; background-image: url('data:image/gif;base64,R0lGODlhEA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arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQACgALACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA=='); background-position: right 5px center; @@ -71,7 +72,8 @@ input.validating-server-side { /* Here you can style the entire form while server being requested when using data-validation="server" */ -form.validating-server-side { +form.async-validation, +form.validating-server-side /* deprecated */ { } @@ -105,4 +107,4 @@ div.form-error ul li { div.form-error ul, div.form-error ul li { background: none; -} \ No newline at end of file +} diff --git a/form-validator/theme-default.min.css b/form-validator/theme-default.min.css index 352a4ec..14e6218 100644 --- a/form-validator/theme-default.min.css +++ b/form-validator/theme-default.min.css @@ -1 +1 @@ -select.error,input.error{border-color:#b94a48;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAARCAYAAAA/mJfHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAYSmlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjarVllVBV/t94TJ6hDdx26pLu7QboVOHRzODQYoIAICmKggoKCiogKBiklJqKIKKhYhIgoKgaKinI/gP7f9733frhr3d+HWc888+y9n73XrJk18wMQFqDR6XEoB0B8QgrD3daC6uvnTyW9ABSEgAJrQJUWmkw3d3V1gv95IQBfRwEBALivTKPT4+D/tjjDwpNDARBXAAgJSw6NB0AuAuBCoXRGCgBhCACk0lPoKQCELwDAw/D18wcgkgGAJ3IFiwAAT8gKVgMAHoanuyUA0QqAzEqjMSIBKK4AQE0LjUwBoNABiFwJYdEJADx5AEST0ChaGIDQVQBYEx+fGAYgNA8A8iH/kify33KG/M1Jo0X+xSu9AAAA2So6mR5Hy4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ogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgPC9yZGY6U2VxPgogICAgICAgICA8L3htcE1NOkhpc3Rvcnk+CiAgICAgICAgIDxwaG90b3Nob3A6VGV4dExheWVycz4KICAgICAgICAgICAgPHJkZjpCYWc+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8cGhvdG9zaG9wOkxheWVyTmFtZT7DlzwvcGhvdG9zaG9wOkxheWVyTmFtZT4KICAgICAgICAgICAgICAgICAgPHBob3Rvc2hvcDpMYXllclRleHQ+w5c8L3Bob3Rvc2hvcDpMYXllclRleHQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHBob3Rvc2hvcDpMYXllck5hbWU+YTwvcGhvdG9zaG9wOkxheWVyTmFtZT4KICAgICAgICAgICAgICAgICAgPHBob3Rvc2hvcDpMYXllclRleHQ+YTwvcGhvdG9zaG9wOkxheWVyVGV4dD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOkJhZz4KICAgICAgICAgPC9waG90b3Nob3A6VGV4dExheWVycz4KICAgICAgICAgPHBob3Rvc2hvcDpDb2xvck1vZGU+MzwvcGhvdG9zaG9wOkNvbG9yTW9kZT4KICAgICAgICAgPHBob3Rvc2hvcDpJQ0NQcm9maWxlPkRpc3BsYXk8L3Bob3Rvc2hvcDpJQ0NQcm9maWxlPgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpYUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyMDAwMC8xMDAwMDwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT42NTUzNTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTk8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MTc8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/Pmkb7KYAAAAgY0hSTQAAbZgAAHOOAAD6zAAAhPoAAHmBAAD9EwAAMG0AABIpDR4mTgAAAOZJREFUeNrMlL0NwyAQhZ+jLJAVkE4M4BVMR50RvIIzAivYI6S+zh4hHgAhZYWM4DTnCCFsoshFnkQBB9/9impZFhylEw5UFsaaatbUbj1iTR1ruhRhrKkGMALoWVOXsY8AHIAHa1KlyO4AVq+ONbkE1MhWAejjh+cMbBDPqzqJQAGoM3c/qnLdlPRcod7G+jAVYQJs0zT2QKXRmADMufMcaC9NJR1VW46sD6YI2wC9og7HkV+tD6/SaKQgIytWk9Y0B5tTkPVhljqZnbubNevFs7E+PBNbI9HfrA/DV6Pxn7/Gr3oPAAwLXEdIhTGuAAAAAElFTkSuQmCC');background-position:right 5px center;background-repeat:no-repeat;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}select.valid,input.valid{border-color:#468847;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAARCAYAAAA/mJfHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAYSmlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjarVllVBV/t94TJ6hDdx26pLu7QboVOHRzODQYoIAICmKggoKCiogKBiklJqKIKKhYhIgoKgaKinI/gP7f9733frhr3d+HWc888+y9n73XrJk18wMQFqDR6XEoB0B8QgrD3daC6uvnTyW9ABSEgAJrQJUWmkw3d3V1gv95IQBfRwEBALivTKPT4+D/tjjDwpN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AgIDxzdEV2dDpzb2Z0d2FyZUFnZW50PkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE0IChNYWNpbnRvc2gpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICAgICA8c3RFdnQ6Y2hhbmdlZD4vPC9zdEV2dDpjaGFuZ2VkPgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgPC9yZGY6U2VxPgogICAgICAgICA8L3htcE1NOkhpc3Rvcnk+CiAgICAgICAgIDxwaG90b3Nob3A6VGV4dExheWVycz4KICAgICAgICAgICAgPHJkZjpCYWc+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8cGhvdG9zaG9wOkxheWVyTmFtZT7DlzwvcGhvdG9zaG9wOkxheWVyTmFtZT4KICAgICAgICAgICAgICAgICAgPHBob3Rvc2hvcDpMYXllclRleHQ+w5c8L3Bob3Rvc2hvcDpMYXllclRleHQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHBob3Rvc2hvcDpMYXllck5hbWU+YTwvcGhvdG9zaG9wOkxheWVyTmFtZT4KICAgICAgICAgICAgICAgICAgPHBob3Rvc2hvcDpMYXllclRleHQ+YTwvcGhvdG9zaG9wOkxheWVyVGV4dD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOkJhZz4KICAgICAgICAgPC9waG90b3Nob3A6VGV4dExheWVycz4KICAgICAgICAgPHBob3Rvc2hvcDpDb2xvck1vZGU+MzwvcGhvdG9zaG9wOkNvbG9yTW9kZT4KICAgICAgICAgPHBob3Rvc2hvcDpJQ0NQcm9maWxlPkRpc3BsYXk8L3Bob3Rvc2hvcDpJQ0NQcm9maWxlPgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpYUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyMDAwMC8xMDAwMDwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT42NTUzNTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTk8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MTc8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/Pn/qNPoAAAAgY0hSTQAAbZgAAHOOAAD6zAAAhPoAAHmBAAD9EwAAMG0AABIpDR4mTgAAAMBJREFUeNrE1L0NwyAURtHrKAu4pPUKXsGs4AIGyGRQ2CM4K3gFt3TJCE5DgSL+7FgKEg0SB77HE82+71w1blw47mc3ais6YAGkUW47fbMA6n6Kqa1ogekbSmLaipe2ok9AC9AfeYAWmHycKqgUswOWAIxBbz8BaGJ9pq0IF1e/YYhA0ii3HmmNVKwxhHIxt8IB0ij3rK2ZDGtRAyUx39ExcExB2df09ZDB0sMoN+eyN6VfQ1sxAG0JqsL+9gV9BgBw6UeG/cRoQwAAAABJRU5ErkJggg==');background-position:right 5px center;background-repeat:no-repeat;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}input[type="file"].error{color:#b94a48;background:none;-webkit-box-shadow:none;box-shadow:none}input[type="file"].valid{color:#468847;background:none;-webkit-box-shadow:none;box-shadow:none}.form-error{display:block;color:#b94a48;margin-top:5px;margin-bottom:10px;line-height:140%}span.help{color:#999;font-size:90%}select.validating-server-side,input.validating-server-side{opacity:0.5;background-image:url('data:image/gif;base64,R0lGOD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MQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQACgALACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==');background-position:right 5px center;background-repeat:no-repeat;background-color:#FFF}form.validating-server-side{}div.form-error{background-color:#f2dede;padding:15px;margin-bottom:20px;border:#b94a48 1px solid;border-radius:4px}div.form-error strong{font-weight:bold;display:block;margin:0;padding:0 0 10px}div.form-error strong,div.form-error ul li{line-height:140%;color:#b94a48;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px}div.form-error ul,div.form-error ul li{background:none} \ No newline at end of file +input.error,input.valid,select.error,select.valid{background-position:right 5px center;background-repeat:no-repeat}input.error,select.error{border-color:#b94a48;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAARCAYAAAA/mJfHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAYSmlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjarVllVBV/t94TJ6hDdx26pLu7QboVOHRzODQYoIAICmKggoKCiogKBiklJqKIKKhYhIgoKgaKinI/gP7f9733frhr3d+HWc888+y9n73XrJk18wMQFqDR6XEoB0B8QgrD3daC6uvnTyW9ABSEgAJrQJUWmkw3d3V1gv95IQBfRwEBALivTKPT4+D/tjjDwpNDARBXAAgJSw6NB0AuAuBCoXRGCgBhCACk0lPoKQCELwDAw/D18wcgkgGAJ3IFiwAAT8gKVgMAHoanuyUA0QqAzEqjMSIBKK4AQE0LjUwBoNABiFwJYdEJADx5AEST0ChaGIDQVQBYEx+fGAYgNA8A8iH/kify33KG/M1Jo0X+xS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2dDpjaGFuZ2VkPgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgPC9yZGY6U2VxPgogICAgICAgICA8L3htcE1NOkhpc3Rvcnk+CiAgICAgICAgIDxwaG90b3Nob3A6VGV4dExheWVycz4KICAgICAgICAgICAgPHJkZjpCYWc+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8cGhvdG9zaG9wOkxheWVyTmFtZT7DlzwvcGhvdG9zaG9wOkxheWVyTmFtZT4KICAgICAgICAgICAgICAgICAgPHBob3Rvc2hvcDpMYXllclRleHQ+w5c8L3Bob3Rvc2hvcDpMYXllclRleHQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHBob3Rvc2hvcDpMYXllck5hbWU+YTwvcGhvdG9zaG9wOkxheWVyTmFtZT4KICAgICAgICAgICAgICAgICAgPHBob3Rvc2hvcDpMYXllclRleHQ+YTwvcGhvdG9zaG9wOkxheWVyVGV4dD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOkJhZz4KICAgICAgICAgPC9waG90b3Nob3A6VGV4dExheWVycz4KICAgICAgICAgPHBob3Rvc2hvcDpDb2xvck1vZGU+MzwvcGhvdG9zaG9wOkNvbG9yTW9kZT4KICAgICAgICAgPHBob3Rvc2hvcDpJQ0NQcm9maWxlPkRpc3BsYXk8L3Bob3Rvc2hvcDpJQ0NQcm9maWxlPgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpYUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyMDAwMC8xMDAwMDwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT42NTUzNTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTk8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MTc8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/Pmkb7KYAAAAgY0hSTQAAbZgAAHOOAAD6zAAAhPoAAHmBAAD9EwAAMG0AABIpDR4mTgAAAOZJREFUeNrMlL0NwyAQhZ+jLJAVkE4M4BVMR50RvIIzAivYI6S+zh4hHgAhZYWM4DTnCCFsoshFnkQBB9/9impZFhylEw5UFsaaatbUbj1iTR1ruhRhrKkGMALoWVOXsY8AHIAHa1KlyO4AVq+ONbkE1MhWAejjh+cMbBDPqzqJQAGoM3c/qnLdlPRcod7G+jAVYQJs0zT2QKXRmADMufMcaC9NJR1VW46sD6YI2wC9og7HkV+tD6/SaKQgIytWk9Y0B5tTkPVhljqZnbubNevFs7E+PBNbI9HfrA/DV6Pxn7/Gr3oPAAwLXEdIhTGuAAAAAElFTkSuQmCC);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}input.valid,select.valid{border-color:#468847;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAgVBMVEUAAABetV5buFtcuFxcuVxdu11cuFxbuFtcuFxcuFxbtltcuFxbtltetl5cuFxct1xduV1fuF9cuFxcuFxbultcuFxduF1gtWBduV1cuFxcuVxcuFxcuFxcuFxet15dt11cuFxcuFxbt1teuF5duV1euF5cuVxcuFxcuFxcuFwAAADG3XcxAAAAKXRSTlMAJrDPRSnn1OjCKvM4MamLFivp8jvI1xgs6jpL++w5UvrxUU83RMe6MlhBCPsAAAABYktHRACIBR1IAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4AwTFzUBkZPjhwAAAHBJREFUGNNjYCAJMDIxsyDzWdk0NdmR+RyampqcCD4XiM/Nw8DLxy8A4gsKAfnCIgwMopqaYuIMDBIwPgOzJkhEQhLElwIplZYBMmWFQXw5iGHyCppgoCgHM14JLKLIg7BQGSiiqILsRFU1dQ3iPQgAPhMLEPHXqSUAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTYtMTItMTlUMjM6NTM6MDErMDE6MDCbiS6WAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE2LTEyLTE5VDIzOjUzOjAxKzAxOjAw6tSWKgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAASUVORK5CYII=);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}input[type=file].error{color:#b94a48;background:0 0;-webkit-box-shadow:none;box-shadow:none}input[type=file].valid{color:#468847;background:0 0;-webkit-box-shadow:none;box-shadow:none}.form-error{display:block;color:#b94a48;margin-top:5px;margin-bottom:10px;line-height:140%}span.help{color:#999;font-size:90%}input.async-validation,input.validating-server-side,select.async-validation,select.validating-server-side{opacity:.5;background-image:url(data:image/gif;base64,R0lGODlhEAAQAPQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+vhQUFJycnAQEBDY2NmhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH+GkNyZWF0ZWQgd2l0aCBhamF4bG9hZC5pbmZvACH5BAAKAAAAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4k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==);background-position:right 5px center;background-repeat:no-repeat;background-color:#FFF}div.form-error{background-color:#f2dede;padding:15px;margin-bottom:20px;border:1px solid #b94a48;border-radius:4px}div.form-error strong{font-weight:700;display:block;margin:0;padding:0 0 10px}div.form-error strong,div.form-error ul li{line-height:140%;color:#b94a48;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px}div.form-error ul,div.form-error ul li{background:0 0} \ No newline at end of file diff --git a/form-validator/toggleDisabled.dev.js b/form-validator/toggleDisabled.dev.js deleted file mode 100644 index d552593..0000000 --- a/form-validator/toggleDisabled.dev.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * jQuery Form Validator Module: Toggle Disabled - * ------------------------------------------ - * Created by Victor Jonsson - * - * This module will take care of disabling/enabling submit buttons - * in forms, depending on if the inputs of the form is valid or not. - * - * @website http://formvalidator.net/ - * @license MIT - * @version 2.2.83 - */ -(function($, window, undefined) { - - 'use strict'; - - // Function that can enable/disable form - var toggleFormState = function($form, state) { - if( state === 'disabled' ) { - $form.find('*[type="submit"]') - .addClass('disabled') - .attr('disabled', 'disabled'); - } else { - $form.find('*[type="submit"]') - .removeClass('disabled') - .removeAttr('disabled'); - } - }, - isCheckingIfFormValid = false; - - $(window).bind('validatorsLoaded formValidationSetup', function(evt, $forms, conf) { - - var $formsToDisable = conf.disabledFormFilter ? $forms.filter(conf.disabledFormFilter) : $forms, - showErrorDialogs = conf.showErrorDialogs === undefined || conf.showErrorDialogs; - - // Toggle form state depending on if it has only valid inputs or not. - $formsToDisable - .addClass(showErrorDialogs ? 'disabled-with-errors' : 'disabled-without-errors') - .find('*[data-validation]') - .attr('data-validation-event','keyup') - .on('validation', function(evt, valid) { - if( !isCheckingIfFormValid ) { - isCheckingIfFormValid = true; - var $form = $(this).closest('form'); - if( valid && $form.isValid(conf, conf.language, false) ) { - toggleFormState($form, 'enabled'); - } else { - toggleFormState($form, 'disabled'); - } - isCheckingIfFormValid = false; - } - }); - - - // Make all inputs validated on keyup, require validateOnEvent in validation config - toggleFormState($formsToDisable, 'disabled'); - - $formsToDisable.validateOnEvent(conf.language, conf); - - }) - .on('validationErrorDisplay', function(evt, $input, $elem) { - if ( $input.closest('form').hasClass('disabled-without-errors') ) { - $elem.hide(); - } - }); - -})(jQuery, window); diff --git a/form-validator/toggleDisabled.js b/form-validator/toggleDisabled.js index ac5a248..38bd9aa 100644 --- a/form-validator/toggleDisabled.js +++ b/form-validator/toggleDisabled.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -!function(a,b,c){"use strict";var d=function(a,b){"disabled"===b?a.find('*[type="submit"]').addClass("disabled").attr("disabled","disabled"):a.find('*[type="submit"]').removeClass("disabled").removeAttr("disabled")},e=!1;a(b).bind("validatorsLoaded formValidationSetup",function(b,f,g){var h=g.disabledFormFilter?f.filter(g.disabledFormFilter):f,i=g.showErrorDialogs===c||g.showErrorDialogs;h.addClass(i?"disabled-with-errors":"disabled-without-errors").find("*[data-validation]").attr("data-validation-event","keyup").on("validation",function(b,c){if(!e){e=!0;var f=a(this).closest("form");c&&f.isValid(g,g.language,!1)?d(f,"enabled"):d(f,"disabled"),e=!1}}),d(h,"disabled"),h.validateOnEvent(g.language,g)}).on("validationErrorDisplay",function(a,b,c){b.closest("form").hasClass("disabled-without-errors")&&c.hide()})}(jQuery,window); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b,c){"use strict";function d(b,c,d){var e=!0;return b.find("[data-validation]").each(function(){if(this!==c){var b=a(this),f=b.hasClass(d.successElementClass),g="true"===b.valAttr("optional"),h=b.hasClass(d.errorElementClass);if(h||!f&&!g)return e=!1,!1}}),e}a.formUtils.registerLoadedModule("toggleDisabled");var e=function(a,b){"disabled"===b?a.find('*[type="submit"]').addClass("disabled").attr("disabled","disabled"):a.find('*[type="submit"]').removeClass("disabled").removeAttr("disabled")},f=!1;a.formUtils.$win.bind("validatorsLoaded formValidationSetup",function(b,g,h){var i=h.disabledFormFilter?g.filter(h.disabledFormFilter):g,j=h.showErrorDialogs===c||h.showErrorDialogs,k=function(b,c,d){var e=a(this);d&&d.indexOf("blur")>-1?e.unbind("afterValidation",k):c.isValid?e.unbind("afterValidation",k):e.valAttr("have-been-blurred")||(c.shouldChangeDisplay=!1)};i.addClass(j?"disabled-with-errors":"disabled-without-errors").on("reset",function(){e(a(this),"disabled")}).find("*[data-validation]").valAttr("event","keyup change").on("validation",function(b,c){if(!f){f=!0;var g=a(this).closest("form");c&&d(g,this,h)?e(g,"enabled"):e(g,"disabled"),f=!1}}).on("afterValidation",k).on("blur",function(){a(this).valAttr("have-been-blurred",1)}).each(function(){var b=a(this),c=b.attr("data-validation");c.indexOf("checkbox_group")>-1&&b.closest("form").find('input[name="'+b.attr("name")+'"]').each(function(){a(this).on("change",function(){b.validate()})})}),i.find("[data-validation-async]").valAttr("event","change"),e(i,"disabled"),i.validateOnEvent(h.language,h)}).on("validationErrorDisplay",function(a,b,c){b.closest("form").hasClass("disabled-without-errors")&&c.hide()})}(a,window)}); \ No newline at end of file diff --git a/form-validator/uk.js b/form-validator/uk.js index fc26d60..ad5cd17 100644 --- a/form-validator/uk.js +++ b/form-validator/uk.js @@ -1,8 +1,9 @@ -/** +/** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @website by + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se * @license MIT - * @version 2.2.83 */ -$.formUtils.addValidator({name:"ukvatnumber",validatorFunction:function(a){if(a=a.replace(/[^0-9]/g,""),a.length<9)return!1;var b=!1,c=[];c=a.split("");var d=Number(c[7]+c[8]),e=c[0],f=c[1];if(0===e&&f>0)return!1;for(var g=0,h=0;7>h;h++)g+=c[h]*(8-h);for(var i=0,j=0,k=8;k>=2;k--)i+=c[j]*k,j++;for(;g>0;)g-=97;return g=Math.abs(g),d===g&&(b=!0),b||(g%=97,g>=55?g-=55:g+=42,g===d&&(b=!0)),b},errorMessage:"",errorMessageKey:"badUKVatAnswer"}); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){"use strict";a.formUtils.registerLoadedModule("uk"),a.formUtils.addValidator({name:"ukvatnumber",validatorFunction:function(a){if(a=a.replace(/[^0-9]/g,""),a.length<9)return!1;var b=!1,c=[];c=a.split("");var d=Number(c[7]+c[8]),e=c[0],f=c[1];if(0===e&&f>0)return!1;for(var g=0,h=0;h<7;h++)g+=c[h]*(8-h);for(var i=0,j=0,k=8;k>=2;k--)i+=c[j]*k,j++;for(;g>0;)g-=97;return g=Math.abs(g),d===g&&(b=!0),b||(g%=97,g>=55?g-=55:g+=42,g===d&&(b=!0)),b},errorMessage:"",errorMessageKey:"badUKVatAnswer"}),a.formUtils.addValidator({name:"ukutr",validatorFunction:function(a){var b=[0,6,7,8,9,10,5,4,3,2],c=[2,1,9,8,7,6,5,4,3,2,1],d=0;if(/\d{10}/.test(a)&&10===a.length){for(var e=0;e<10;e++)d+=a[e]*b[e];if(parseInt(a.charAt(0))===c[d%11])return!0}return!1},errorMessage:"",errorMessageKey:"badUkUtr"}),a.formUtils.addValidator({name:"uknin",validatorFunction:function(a){return!!/^(?!BG)(?!GB)(?!NK)(?!KN)(?!TN)(?!NT)(?!ZZ)(?:[A-CEGHJ-PR-TW-Z][A-CEGHJ-NPR-TW-Z])(?:\s*\d\s*){6}([A-D]|\s)$/i.test(a)},errorMessage:"",errorMessageKey:"badUkNin"})}(a)}); \ No newline at end of file diff --git a/formvalidator.jquery.json b/formvalidator.jquery.json index 2a6ba29..3507aa1 100644 --- a/formvalidator.jquery.json +++ b/formvalidator.jquery.json @@ -7,7 +7,7 @@ "validation", "validator" ], - "version": "2.2.83", + "version": "2.3.79", "author": { "name": "Victor Jonsson", "url": "http://victorjonsson.se", diff --git a/package.json b/package.json index adb7884..dd540de 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jquery-form-validator", "description": "With this feature rich jQuery plugin it becomes easy to validate user input while keeping your HTML markup clean from javascript code. Even though this plugin has a wide range of validation functions it's designed to require as little bandwidth as possible. This is achieved by grouping together validation functions in \"modules\", making it possible for the programmer to load only those functions that's needed to validate a particular form.", - "version": "2.2.83", + "version": "2.3.79", "main": "./form-validator/jquery.form-validator.min.js", "keywords": [ "form", @@ -13,28 +13,37 @@ "url": "git+https://github.com/victorjonsson/jQuery-Form-Validator.git" }, "bugs": { - "url": "https://github.com/jquery-boilerplate/jquery-boilerplate/issues" + "url": "https://github.com/victorjonsson/jQuery-Form-Validator/issues" }, "author": { "name": "Victor Jonsson", "email": "kontakt@victorjonsson.se", - "url": "https://github.com/victorjonsson" + "url": "http://victorjonsson.se" }, "homepage": "http://formvalidator.net/", - "volo": { - "url": "https://raw.githubusercontent.com/lagden/jQuery-Form-Validator/{version}/form-validator/jquery.form-validator.js" - }, "license": "MIT", "devDependencies": { "grunt": "~0.4.5", "grunt-cli": "~0.1.13", + "grunt-contrib-clean": "~1.0.0", "grunt-contrib-concat": "^0.5.1", - "grunt-contrib-jshint": "^0.11.0", + "grunt-contrib-connect": "^0.11.2", + "grunt-contrib-copy": "~1.0.0", + "grunt-contrib-cssmin": "~0.14.0", + "grunt-contrib-jshint": "~1.0.0", "grunt-contrib-qunit": "^0.7.0", - "grunt-contrib-uglify": "^0.8.0", - "grunt-contrib-watch": "^0.6.1" + "grunt-contrib-uglify": "~0.11.1", + "grunt-contrib-watch": "^0.6.1", + "grunt-umd": "~2.4.0", + "numeral": "~1.5.3", + "qunitjs": "^1.20.0", + "jquery": "2.2.4" + }, + "dependencies": { + "jquery": "2.2.4" }, "scripts": { - "test": "grunt travis --verbose" + "prepublish": "grunt prepublish", + "test": "grunt test" } } diff --git a/src/lang/ar.js b/src/lang/ar.js new file mode 100644 index 0000000..f2165d6 --- /dev/null +++ b/src/lang/ar.js @@ -0,0 +1,79 @@ +/** + * jQuery Form Validator + * ------------------------------------------ + * + * Arabic language package + * + * @website http://formvalidator.net/ + * @license MIT + */ +(function($, window) { + + 'use strict'; + + $.formUtils.registerLoadedModule('lang/ar'); + + $(window).bind('validatorsLoaded', function() { + + $.formUtils.LANG = { + errorTitle: 'فَشِلَ إرسال النموذج', + requiredField: 'هذا الحقل مطلوب', + requiredFields: 'لم يتم ملأ جميع الحقول المطلوبة.', + badTime: 'حقل الوقت خاطىء', + badEmail: 'البريد الإلكتروني المدخل خاطئ', + badTelephone: 'رقم الهاتف المدخل خاطئ', + badSecurityAnswer: 'لم يتم الإجابة عن سؤال الأمان', + badDate: 'تاريخ مدخل خاطئ', + lengthBadStart: 'القيمة المدخلة يجب أن تكون بين ', + lengthBadEnd: ' حروف', + lengthTooLongStart: 'القيمة المدخل أطول من ', + lengthTooShortStart: 'القيمة المدخل أقصر من ', + notConfirmed: 'لم يتم تأكيد القيمة المدخلة', + badDomain: 'قيمة نطاق خاطئة', + badUrl: 'القيمة المدخلة ليست رابطاً صالحاً', + badCustomVal: 'القيمة المدخلة غير صالحة', + andSpaces: ' ومسافات ', + badInt: 'القيمة المدخلة ليست رقماً صحيحاً', + badSecurityNumber: 'رقم بطاقة الهوية غير صحيح', + badUKVatAnswer: 'رقم UK VAT غير صحيح', + badUKNin: 'غير صحيح UK NINرقم ', + badUKUtr: 'غير صحيح UK UTR رقم', + badStrength: 'كلمة المرور غير قوية', + badNumberOfSelectedOptionsStart: 'يجب اختيار على الأقل ', + badNumberOfSelectedOptionsEnd: ' أجوبة', + badAlphaNumeric: 'القيمة المدخلة يجب أن تتضمن حروف وأرقام فقط ', + badAlphaNumericExtra: ' و ', + wrongFileSize: 'الملف المراد تحميله كبير جداً (الحد المسموج %s)', + wrongFileType: 'ملفات من نوع %s فقط مسموحة', + groupCheckedRangeStart: 'من فضلك اختر بين ', + groupCheckedTooFewStart: 'من فضلك اختر على الأقل ', + groupCheckedTooManyStart: 'من فضلك اختر بحد أقصى ', + groupCheckedEnd: ' مرات', + badCreditCard: 'رقم بطاقة ائتمانية خاطىء', + badCVV: 'رمز الأمان خاطئ', + wrongFileDim : 'حدود الصورة غير صالحة', + imageTooTall : 'الصورة يمكن أن تكون أطول من', + imageTooWide : 'الصورة يمكن أن تكون أعرض من', + imageTooSmall : 'صورة صغيرة جداً', + min : 'أدنى', + max : 'أقصى', + imageRatioNotAccepted : 'أبعاد صورة غير مقبولة', + badBrazilTelephoneAnswer: 'رقم هاتف مدخل خاطىء', + badBrazilCEPAnswer: 'قيمة CEP المدخلة غير صحيحة', + badBrazilCPFAnswer: 'قيمة CPF المدخلة غير صحيحة', + badPlPesel: 'قيمة Pl PESEL المدخلة غير صحيحة', + badPlNip: 'قيمة Pl NIP المدخلة غير صحيحة', + badPlRegon: 'قيمة Pl REGON المدخلة غير صحيحة', + badreCaptcha: 'من فضلك أكد أنك لست روبوتاً', + passwordComplexityStart: 'كملة المرور تتكون على الأقل من ', + passwordComplexitySeparator: ', ', + passwordComplexityUppercaseInfo: ' حروف كبيرة', + passwordComplexityLowercaseInfo: ' حروف صغيرة', + passwordComplexitySpecialCharsInfo: ' رموز خاصة', + passwordComplexityNumericCharsInfo: ' أرقام', + passwordComplexityEnd: '.' + }; + + }); + +})(jQuery, window); diff --git a/src/lang/ca.js b/src/lang/ca.js new file mode 100644 index 0000000..3f7123c --- /dev/null +++ b/src/lang/ca.js @@ -0,0 +1,63 @@ +/** + * jQuery Form Validator + * ------------------------------------------ + * + * Catalan language package + * + * @website http://formvalidator.net/ + * @license MIT + */ +(function($, window) { + + 'use strict'; + + $.formUtils.registerLoadedModule('lang/ca'); + + $(window).bind('validatorsLoaded', function() { + + $.formUtils.LANG = { + errorTitle: 'El formulari no s\'ha pogut enviar!', + requiredField: 'Aquest camp és obligatori', + requiredFields: 'No ha contestat tots els camps requerits', + badTime: 'L\'hora proporcionada no és vàlida', + badEmail: 'La direcció d\'e-mail no és vàlida', + badTelephone: 'El número de telèfon proporcionat no és vàlid', + badSecurityAnswer: 'La resposta a la seva pregunta de seguretat és incorrecte', + badDate: 'La data proporcionada no és vàlida', + lengthBadStart: 'La seva resposta s\'ha d\'incloure entre ', + lengthBadEnd: ' caràcters', + lengthTooLongStart: 'La seva resposta ha de ser menor a ', + lengthTooShortStart: 'La seva resposta ha de ser major a ', + notConfirmed: 'Els valors proporcionats no poden ser confirmats', + badDomain: 'Ha introduït un domini incorrecte', + badUrl: 'La URL proporcionada no és vàlida', + badCustomVal: 'Els valors proporcionats no són vàlids', + andSpaces: ' i espais ', + badInt: 'El valor proporcionat no és un número vàlid', + badSecurityNumber: 'El número de seguretat social proporcionat és incorrecte', + badUKVatAnswer: 'El número VAT proporcionat no és vàlid pel Regne Unit', + badStrength: 'La contrasenya proporcionada no és suficientment segura', + badNumberOfSelectedOptionsStart: 'Ha de seleccionar almenys', + badNumberOfSelectedOptionsEnd: ' resposta(es)', + badAlphaNumeric: 'El valor proporcionat només ha de contenir caràcters alfanumèrics (a-z i números)', + badAlphaNumericExtra: ' i', + wrongFileSize: 'L\'arxiu que està tractant de pujar és massa gran (màx. %s)', + wrongFileType: 'Només els arxius de tipus %s estan permesos', + groupCheckedRangeStart: 'Si us plau, triï entre ', + groupCheckedTooFewStart: 'Si us plau, triï almenys ', + groupCheckedTooManyStart: 'Si us plau, triï un màxim de ', + groupCheckedEnd: ' element(s)', + badCreditCard: 'El número de targeta de crèdit proporcionat no és vàlid', + badCVV: 'CVV proporcionat no és vàlid', + wrongFileDim: 'Les dimensions de la imatge no són vàlides,', + imageTooTall: 'l\'alçada de la imatge no pot ser major a', + imageTooWide: 'l\'amplada de la imatge no pot ser major a', + imageTooSmall: 'la imatge és massa petita', + min: 'min.', + max: 'màx.', + imageRatioNotAccepted : 'La proporció de la imatge (alçada x amplada) no és vàlida' + }; + + }); + +})(jQuery, window); diff --git a/form-validator/lang/cz.dev.js b/src/lang/cs.js similarity index 98% rename from form-validator/lang/cz.dev.js rename to src/lang/cs.js index 71b29d8..b2a5bd8 100644 --- a/form-validator/lang/cz.dev.js +++ b/src/lang/cs.js @@ -6,12 +6,13 @@ * * @website http://formvalidator.net/ * @license MIT - * @version 2.2.83 */ (function($, window) { 'use strict'; + $.formUtils.registerLoadedModule('lang/cs'); + $(window).bind('validatorsLoaded', function() { $.formUtils.LANG = { diff --git a/src/lang/da.js b/src/lang/da.js new file mode 100644 index 0000000..fe875bc --- /dev/null +++ b/src/lang/da.js @@ -0,0 +1,66 @@ +/** + * jQuery Form Validator + * ------------------------------------------ + * + * Danish language package + * + * @website http://formvalidator.net/ + * @license MIT + */ +(function($, window) { + + 'use strict'; + + $.formUtils.registerLoadedModule('lang/da'); + + $(window).bind('validatorsLoaded', function() { + + $.formUtils.LANG = { + andSpaces: ' og mellemrum ', + badAlphaNumeric: 'Det indtastede kan kun indeholde alfanumeriske karakter ', + badAlphaNumericExtra: ' og ', + badCVV: 'Det angivne CVV nummer er ugyldigt', + badCreditCard:'Det angivne kortnummer er ugyldigt', + badCustomVal: 'Den indtastede værdi er ugyldig', + badDate: 'Den angivne dato er ugyldig', + badDomain: 'Det angivne domæne er ugyldigt', + badEmail: 'Den angivne email adresse er ugyldig', + badInt: 'Det angivne tal er ugyldigt', + badNumberOfSelectedOptionsEnd: ' svar', + badNumberOfSelectedOptionsStart: 'Du skal vælge mindst ', + badSecurityAnswer: 'Du har ikke angivet et korrekt svar til sikkerhedsspørgsmålet', + badSecurityNumber: 'Dit CPR nummer er ikke korrekt', + badStrength: 'Det angivne password er ikke stærkt nok', + badTelephone: 'Det angivne telefonnummer er ugyldigt', + badTime: 'Det angivne tidspunkt er ugyldigt', + badUrl: 'Den angivne URL er ugyldig', + badreCaptcha: 'Verificer venligst at du ikke er en bot', + errorTitle: 'Formular forespørgslen fejlede!', + groupCheckedEnd: ' ting', + groupCheckedRangeStart: 'Vælg venligst mellem ', + groupCheckedTooFewStart: 'Vælg mindst ', + groupCheckedTooManyStart: 'Vælg højst ', + imageRatioNotAccepted: 'Billedets dimensioner er ikke acceptable', + imageTooSmall: 'Billedet er for lille', + imageTooTall: 'Billedet må ikke være højere end', + imageTooWide: 'Billedet må ikke være bredere end', + lengthBadEnd: ' tegn', + lengthBadStart: 'Feltets værdi skal være mellem ', + lengthTooLongStart: 'Feltets værdi må ikke være længere end ', + lengthTooShortStart: 'Feltets værdi må ikke være kortere end ', + max: 'max', + min: 'min', + notConfirmed: 'Feltværdierne kunne ikke bekræftes', + requiredField: 'Dette felt er påkrævet', + requiredFields: 'Du har ikke udfyldt alle påkrævede felter', + wrongFileDim: 'Forkerte billede dimensioner,', + wrongFileSize: 'Filen du forsøger at uploade er for stor (max %s)', + wrongFileType: 'Udelukkende filer at følgedne type er tilladt %s' + }; + + }); + +})(jQuery, window); + + + diff --git a/form-validator/lang/de.dev.js b/src/lang/de.js similarity index 76% rename from form-validator/lang/de.dev.js rename to src/lang/de.js index 6f6d3c2..485f92d 100644 --- a/form-validator/lang/de.dev.js +++ b/src/lang/de.js @@ -6,12 +6,13 @@ * * @website http://formvalidator.net/ * @license MIT - * @version 2.2.83 */ (function($, window) { 'use strict'; + $.formUtils.registerLoadedModule('lang/de'); + $(window).bind('validatorsLoaded', function() { $.formUtils.LANG = { @@ -22,25 +23,25 @@ badEmail: 'Sie haben keine gültige E-Mail-Adresse eingegeben', badTelephone: 'Sie haben keine richtige Telefonnummer eingetragen', badSecurityAnswer: 'Sie haben die falsche Antwort auf die Sicherheitsfrage eingegeben', - badDate: 'Re-Eingabe eines falschen Datums', - lengthBadStart: 'Der eingegebene Wert muss da zwischen sein ', + badDate: 'Eingabe eines falschen Datums', + lengthBadStart: 'Der eingegebene Wert muss dazwischen sein ', lengthBadEnd: '  Zeichen', - lengthTooLongStart: 'Eingegebene Wert ist größer als ', - lengthTooShortStart: 'Eingegebene Wert ist größer als ', - notConfirmed: 'Die Antworten könnten nicht gegenseitig bestätigen,', + lengthTooLongStart: 'Der eingegebene Wert ist größer als ', + lengthTooShortStart: 'Der eingegebene Wert ist kleiner als ', + notConfirmed: 'Die Eingaben sind unterschiedlich', badDomain: 'Sie haben die falsche Domäne eingetragen', badUrl: 'Sie haben nicht die richtige URL eingegeben', - badCustomVal: 'Re-Eingabe einer falschen Antwort', + badCustomVal: 'Eingabe einer falschen Antwort', andSpaces: ' und Leerzeichen', badInt: 'Sie haben keine Nummer eingegeben', badSecurityNumber: 'Sie haben eine falsche Sozialversicherungsnummer eingegeben', - badUKVatAnswer: 'Sie haben keine UK Umsatzsteuer-Identifikationsnummer eingegeben', + badUKVatAnswer: 'Sie haben keine UK-Umsatzsteuer-Identifikationsnummer eingegeben', badStrength: 'Sie haben ein Kennwort, das nicht sicher genug ist eingegeben', badNumberOfSelectedOptionsStart: 'Wählen Sie zu mindestens ', badNumberOfSelectedOptionsEnd: ' Antwort', - badAlphaNumeric: 'Sie können nur mit alphanumerische Zeichen (Buchstaben und Zahlen) eingaben', + badAlphaNumeric: 'Sie können nur alphanumerische Zeichen (Buchstaben und Zahlen) eingeben', badAlphaNumericExtra: ' und', - wrongFileSize: 'Die Datei, die Sie hochzuladen versuchen, zu groß ist (max %s)', + wrongFileSize: 'Die Datei, die Sie hochzuladen versuchen, ist zu groß (max %s)', wrongFileType: 'Nur Dateien vom Typ %s sind zulässig', groupCheckedRangeStart: 'Wählen Sie zwischen', groupCheckedTooFewStart: 'Dann müssen Sie zumindest sicher,', @@ -48,8 +49,8 @@ groupCheckedEnd: ' Auswahl', badCreditCard: 'Sie haben eine ungültige Kreditkartennummer eingegeben', badCVV: 'Sie haben eine falsche CVV eingegeben', - wrongFileDim: 'Illegal Bildgröße,', - imageTooTall: 'Bild kann nicht größer als', + wrongFileDim: 'Illegale Bildgröße,', + imageTooTall: 'Bild kann nicht größer sein als', imageTooWide: 'Bild kann nicht breiter sein als', imageTooSmall: 'Bild ist zu klein', min: 'min', diff --git a/form-validator/lang/es.dev.js b/src/lang/es.js similarity index 83% rename from form-validator/lang/es.dev.js rename to src/lang/es.js index fc686ec..4bf3750 100644 --- a/form-validator/lang/es.dev.js +++ b/src/lang/es.js @@ -5,13 +5,14 @@ * Spanish language package * * @website http://formvalidator.net/ - * @license Dual licensed under the MIT or GPL Version 2 licenses - * @version 2.2.83 + * @license MIT */ (function($, window) { 'use strict'; + $.formUtils.registerLoadedModule('lang/es'); + $(window).bind('validatorsLoaded', function() { $.formUtils.LANG = { @@ -34,7 +35,7 @@ andSpaces: ' y espacios ', badInt: 'El valor proporcionado no es un número válido', badSecurityNumber: 'El número de seguridad social proporcionado es incorrecto', - badUKVatAnswer: 'No número VAT proporcionado no es válido para el Reino Unido', + badUKVatAnswer: 'El número VAT proporcionado no es válido para el Reino Unido', badStrength: 'La contraseña proporcionada no es lo suficientemente segura', badNumberOfSelectedOptionsStart: 'Debe seleccionar al menos', badNumberOfSelectedOptionsEnd: ' respuesta(s)', @@ -54,7 +55,14 @@ imageTooSmall: 'la imagen es demasiado pequeña', min: 'min.', max: 'máx.', - imageRatioNotAccepted : 'La proporción de imagen (alto x ancho) no es válida' + imageRatioNotAccepted : 'La proporción de imagen (alto x ancho) no es válida', + passwordComplexityStart: 'La contraseña debe contener al menos ', + passwordComplexitySeparator: ', ', + passwordComplexityUppercaseInfo: ' mayúscula(s)', + passwordComplexityLowercaseInfo: ' minúscula(s)', + passwordComplexitySpecialCharsInfo: ' caracter(es) especial(es)', + passwordComplexityNumericCharsInfo: ' número(s)', + passwordComplexityEnd: '.' }; }); diff --git a/src/lang/fa.js b/src/lang/fa.js new file mode 100644 index 0000000..e163493 --- /dev/null +++ b/src/lang/fa.js @@ -0,0 +1,65 @@ +/* jshint -W100 */ +/** + * jQuery Form Validator + * ------------------------------------------ + * + * Farsi language package + * + * @website http://formvalidator.net/ + * @license MIT + * @version 0.0.1 + */ +(function($, window) { + + 'use strict'; + + $.formUtils.registerLoadedModule('lang/fa'); + + $(window).bind('validatorsLoaded', function() { + + $.formUtils.LANG = { + errorTitle: 'ثبت فرم با مشکل مواجه شد!', + requiredField: 'شما همه فیلدهای ضروری را تکمیل نکرده اید', + requiredFields: 'شما فیلد ضروری را تکمیل نکرده اید', + badTime: 'زمان درستی را وارد نکرده اید', + badEmail: 'آدرس ایمیل را به درستی وارد نکرده اید', + badTelephone: 'شماره تلفن وارد شده معتبر نیست', + badSecurityAnswer: 'شما به سوال امنیتی درست پاسخ نداده اید', + badDate: 'تاریخ درستی را وارد نکرده اید', + lengthBadStart: 'مقدار وارد شده باید ', + lengthBadEnd: ' حرف باشد.', + lengthTooLongStart: 'مقدار ورودی بیشتر از ', + lengthTooShortStart: 'مقدار ورودی کمتر از ', + notConfirmed: 'ورودی ها یکسان نیستند', + badDomain: 'آدرس دامنه به درستی وارد نشده است', + badUrl: 'آدرس اینترنتی به درستی وارد نشده است', + badCustomVal: 'مقدار ورودی نادرست است', + andSpaces: ' و فاصله خالی ', + badInt: 'مقدار ورودی باید عدد باشد', + badSecurityNumber: 'شماره امنیت اجتماعی شما معتبر نیست', + badUKVatAnswer: 'شماره مالیاتی شما درست نیست', + badStrength: 'کلمه عبور به قدر کافی مستحکم نیست', + badNumberOfSelectedOptionsStart: 'شما باید حداقل ', + badNumberOfSelectedOptionsEnd: ' پاسخ را انتخاب کنید', + badAlphaNumeric: 'مقدار ورودی می تواند حروف و شماره باشد ', + badAlphaNumericExtra: ' و ', + wrongFileSize: 'حجم فایل انتخابی زیاد است. (حداکثر %s)', + wrongFileType: 'فقط فایل های با فرمت %s مجاز هستند', + groupCheckedRangeStart: 'لطفا بین ', + groupCheckedTooFewStart: 'لطفا حداقل ', + groupCheckedTooManyStart: 'لطفا حداکثر ', + groupCheckedEnd: ' گزینه انتخاب کنید', + badCreditCard: 'شماره کارت اعتباری معتبر نیست', + badCVV: 'کد شناسایی سی وی وی معتبر نیست', + wrongFileDim : 'ابعاد تصویر صحیح نیست,', + imageTooTall : 'حداکثر طول تصویر', + imageTooWide : 'حداکثر عرض تصویر', + imageTooSmall : 'تصویر خیلی کوچک است', + min : 'حداقل', + max : 'حداکثر', + imageRatioNotAccepted : 'نسبت ابعاد تصویر مناسب نیست' + }; + + }); + +})(jQuery, window); diff --git a/form-validator/lang/fr.dev.js b/src/lang/fr.js similarity index 82% rename from form-validator/lang/fr.dev.js rename to src/lang/fr.js index 18b6499..2259e7f 100644 --- a/form-validator/lang/fr.dev.js +++ b/src/lang/fr.js @@ -6,12 +6,13 @@ * * @website http://formvalidator.net/ * @license MIT - * @version 2.2.83 */ (function($, window) { 'use strict'; + $.formUtils.registerLoadedModule('lang/fr'); + $(window).bind('validatorsLoaded', function() { $.formUtils.LANG = { @@ -23,32 +24,32 @@ badTelephone: 'Vous n\'avez pas saisi un numéro de téléphone valide', badSecurityAnswer: 'Vous avez saisi une mauvaise réponse à la question de sécurité', badDate: 'Vous n\'avez pas saisi une date correcte', - lengthBadStart: 'Votre saisie doit comporter entre', + lengthBadStart: 'Votre saisie doit comporter entre ', lengthBadEnd: ' caractères', - lengthTooLongStart: 'Vous avez saisi une réponse qui est plus longue que', - lengthTooShortStart: 'Votre saisie est plus courte que', + lengthTooLongStart: 'Vous avez saisi une réponse qui est plus longue que ', + lengthTooShortStart: 'Votre saisie est plus courte que ', notConfirmed: 'Les saisies ne sont pas identiques', badDomain: 'Vous avez saisi un domaine incorrect', badUrl: 'Vous avez saisi une URL incorrecte', badCustomVal: 'Re-saisissez une réponse correcte', - andSpaces: ' et des espaces', + andSpaces: ' et des espaces ', badInt: 'Vous n\'avez pas saisi un numéro', badSecurityNumber: 'Vous avez saisi un mauvais numéro de sécurité sociale', badUKVatAnswer: 'Vous n\'avez pas saisi un numéro de TVA au Royaume-Uni', badStrength: 'Vous avez saisi un mot de passe pas assez sécurisé', - badNumberOfSelectedOptionsStart: 'Vous devez sélectionner au moins', + badNumberOfSelectedOptionsStart: 'Vous devez sélectionner au moins ', badNumberOfSelectedOptionsEnd: ' réponse(s)', - badAlphaNumeric: 'Vous ne pouvez répondre qu\'avec des caractères alphanumériques et des chiffres', - badAlphaNumericExtra: ' et', + badAlphaNumeric: 'Vous ne pouvez répondre qu\'avec des caractères alphanumériques et des chiffres ', + badAlphaNumericExtra: ' et ', wrongFileSize: 'Le fichier que vous essayez de télécharger est trop grand (max %s)', wrongFileType: 'Seuls les fichiers du type %s sont autorisés', - groupCheckedRangeStart: 'Choisissez entre', - groupCheckedTooFewStart: 'Vous devez faire au moins', - groupCheckedTooManyStart: 'Vous ne pouvez pas faire plus de', + groupCheckedRangeStart: 'Choisissez entre ', + groupCheckedTooFewStart: 'Vous devez faire au moins ', + groupCheckedTooManyStart: 'Vous ne pouvez pas faire plus de ', groupCheckedEnd: ' sélection(s)', badCreditCard: 'Vous avez saisi un numéro de carte de crédit invalide', badCVV: 'Vous avez saisi un CVV incorrect', - wrongFileDim: 'Mauvaise taille de l\'image,', + wrongFileDim: 'Mauvaise taille de l\'image, ', imageTooTall: 'l\'image ne peut pas être plus élevée que', imageTooWide: 'l\'image ne peut pas être plus large que', imageTooSmall: 'l\'image est trop petite', diff --git a/src/lang/it.js b/src/lang/it.js new file mode 100644 index 0000000..35cf0ba --- /dev/null +++ b/src/lang/it.js @@ -0,0 +1,63 @@ +/** + * jQuery Form Validator + * ------------------------------------------ + * + * Italian language package + * + * @website http://formvalidator.net/ + * @license MIT + * @version 2.2.163 + */ +(function($, window) { + 'use strict'; + + $.formUtils.registerLoadedModule('lang/it'); + + $(window).bind('validatorsLoaded', function() { + + $.formUtils.LANG = { + errorTitle: 'Impossibile inviare il modulo!', + requiredField: 'Campo obbligatorio', + requiredFields: 'Non sono stati compilati tutti i campi richiesti', + badTime: 'L\'ora scelta non è valida', + badEmail: 'Questo indirizzo email non è valido', + badTelephone: 'Il numero di telefono imputato non è valido', + badSecurityAnswer: 'La risposta alla domanda di sicurezza è errata', + badDate: 'La data scelta non è valida', + lengthBadStart: 'La sua risposta non può essere più lunga di ', + lengthBadEnd: ' caratteri', + lengthTooLongStart: 'La lunghezza della risposta deve essere minore di ', + lengthTooShortStart: 'La lunghezza della risposta deve essere maggiore di ', + notConfirmed: 'Il valore non è stato confermato.', + badDomain: 'Il dominio inserito non è corretto.', + badUrl: 'L\' URL inserito non è valido', + badCustomVal: 'I valori inseriti non sono validi', + andSpaces: ' e spazi ', + badInt: 'Il numero inserito non è valido', + badSecurityNumber: 'Il numero di sicurezza inserito non è valido', + badUKVatAnswer: 'La Partita IVA (VAT) inserita non è valida nel Regno Unito', + badStrength: 'La password proposta non è sufficientemente sicura', + badNumberOfSelectedOptionsStart: 'Deve selezionare almeno', + badNumberOfSelectedOptionsEnd: ' risposta/e', + badAlphaNumeric: 'Il valore proposto deve contenere caratteri alfanumerici (a-z e 1234...)', + badAlphaNumericExtra: '', + wrongFileSize: 'Il file che si sta cercando di caricare è troppo grande (massimo %s)', + wrongFileType: 'Solo i file di tipo %s possono essere inviati', + groupCheckedRangeStart: 'Si prega di scegliere tra ', + groupCheckedTooFewStart: 'Si prega di selezionare un minimo di ', + groupCheckedTooManyStart: 'Si prega di selezionare un massimo di ', + groupCheckedEnd: ' opzione/i', + badCreditCard: 'Il numero di carta di credito non risulta valido', + badCVV: 'CVV non valido', + wrongFileDim: 'La dimensione dell\'immagine non è valida,', + imageTooTall: 'il lato alto dell\'immagine non può essere maggiore di', + imageTooWide: 'il lato lungo dell\'immagine non può essere maggiore di', + imageTooSmall: 'L\'immagine è troppo piccola', + min: 'min.', + max: 'máx.', + imageRatioNotAccepted : 'La proporzione dell\' immagine (altezza x larghezza) non è valida' + }; + + }); + +})(jQuery, window); diff --git a/src/lang/ka.js b/src/lang/ka.js new file mode 100644 index 0000000..eb42c13 --- /dev/null +++ b/src/lang/ka.js @@ -0,0 +1,69 @@ +/** + * jQuery Form Validator + * ------------------------------------------ + * + * Georgian language package + * + * @website http://formvalidator.net/ + * @license MIT + */ +(function($, window) { + + 'use strict'; + + $.formUtils.registerLoadedModule('lang/ka'); + + $(window).bind('validatorsLoaded', function() { + + $.formUtils.LANG = { + errorTitle: 'ფორმა ვერ გაიგზავნა!', + requiredField: 'ველის შევსება სავალდებულოა', + requiredFields: 'თქვენ არ შეგივსიათ ყველა სავალდებულო ველი', + badTime: 'თქვენ მიუთითეთ არასწორი დრო', + badEmail: 'თქვენ მიუთითეთ არასწორი ელ.ფოსტის მისამართი', + badTelephone: 'თქვენ მიუთითეთ არასწორი ტელეფონის ნომერი', + badSecurityAnswer: 'თქვენ გაეცით არასწორი პასუხი უსაფრთხოების კითხვას', + badDate: 'თქვენ მიუთითეთ არასწორი თარიღი', + lengthBadStart: 'ველის მნიშვნელობის სიგრძე უნდა იყოს ', + lengthBadEnd: ' შუალედში', + lengthTooLongStart: 'ველის მნიშვნელობის სიგრძე უნდა იყოს მაქსიმუმ ', + lengthTooShortStart: 'ველის მნიშვნელობის სიგრძე უნდა იყოს მინიმუმ ', + notConfirmed: 'ველის მნიშვნელობები ვერ დადასტურდა', + badDomain: 'არასწორი დომენის მისამართი', + badUrl: 'ველის მნიშვნელობა არ არის მართებული URL მისამართი', + badCustomVal: 'ველის მნიშვნელობა არ არის მართებული', + andSpaces: ' და გამოტოვებები ', + badInt: 'ველის მნიშვნელობა არ არის მართებული რიცხვი', + badStrength: 'პაროლი არ არის საკმარისად ძლიერი (კარგი)', + badNumberOfSelectedOptionsStart: 'თქვენ უნდა აირჩიოთ სულ მცირე ', + badNumberOfSelectedOptionsEnd: ' პასუხი', + badAlphaNumeric: 'ველის მნიშვნელობა უნდა შეიცავდეს მხოლოდ ციფრებსა და ასოებს ', + badAlphaNumericExtra: ' და ', + wrongFileSize: 'ფაილი, რომლის ატვირთვასაც ცდილობთ არის ძალიან დიდი (დასაშვებია მაქსიმუმ %s)', + wrongFileType: 'დასაშვებია მხოლოდ შემდეგი გაფართოების ფაილები: %s', + groupCheckedRangeStart: 'გთხოვთ, აირჩიოთ ', + groupCheckedTooFewStart: 'გთხოვთ, აირჩიოთ სულ მცირე ', + groupCheckedTooManyStart: 'გთხოვთ, აირჩიოთ მაქსიმუმ ', + groupCheckedEnd: ' პუნქტი', + badCreditCard: 'საკრედიტო ბარათის ნომერი არ არის მართებული', + badCVV: 'CVV კოდი არ არის მართებული', + wrongFileDim: 'არამართებული სურათის ზომები,', + imageTooTall: 'სურათი არ უნდა იყოს უფრო გრძელი ვიდრე', + imageTooWide: 'სურათი არ უნდა იყოს უფრო ფართე ვიდრე', + imageTooSmall: 'სურათი არის ძალიან პატარა', + min: 'მინიმუმ', + max: 'მაქსიმუმ', + imageRatioNotAccepted: 'სურათის სიგრძისა და სიგანის ეს თანაფარდობა დაუშვებელია', + badBrazilTelephoneAnswer: 'მითითებული ტელეფონის ნომერი არ არის მართებული', + badreCaptcha: 'დაადასტურეთ, რომ არ ხართ რობოტი', + passwordComplexityStart: 'პაროლი უნდა შეიცავდეს მინიმუმ ', + passwordComplexitySeparator: ', ', + passwordComplexityUppercaseInfo: ' დიდი ასო(ები)', + passwordComplexityLowercaseInfo: ' პატარა ასო(ები)', + passwordComplexitySpecialCharsInfo: ' სპეციალური სიმბოლო(ები)', + passwordComplexityNumericCharsInfo: ' რიცხვითი მნიშვნელობა(ები)', + passwordComplexityEnd: '.' + }; + }); + +})(jQuery, window); diff --git a/src/lang/ko.js b/src/lang/ko.js new file mode 100644 index 0000000..2ed7d38 --- /dev/null +++ b/src/lang/ko.js @@ -0,0 +1,70 @@ +/** + * jQuery Form Validator + * ------------------------------------------ + * + * Korean language package + * + * @website http://formvalidator.net/ + * @license MIT + */ +(function($, window) { + + 'use strict'; + + $.formUtils.registerLoadedModule('lang/ko'); + + $(window).bind('validatorsLoaded', function() { + + $.formUtils.LANG = { + errorTitle: '이 양식은 보낼 수 없습니다!', + requiredField: '필수 입력란입니다.', + requiredFields: '모든 필수 입력란을 입력해야 합니다.', + badTime: '시간을 정확하게 입력하지 않았습니다.', + badEmail: 'e-mail을 정확하게 입력하지 않았습니다.', + badTelephone: '전화번호를 정확하게 입력하지 않았습니다.', + badSecurityAnswer: '보안 입력을 정확하게 입력하지 않았습니다.', + badDate: '날짜를 정확하게 입력하지 않았습니다.', + lengthBadStart: '입력 값은 ', + lengthBadEnd: ' 사이의 문자여야 합니다.', + lengthTooLongStart: '입력 값의 길이가 ', + lengthTooLongEnd: ' 보다 깁니다.', + lengthTooShortStart: '입력 값의 길이가 ', + lengthTooShortEnd: ' 보다 짧습니다.', + notConfirmed: '입력 값이 일치하지 않습니다.', + badDomain: '도메인을 정확하게 입력하지 않았습니다.', + badUrl: 'URL을 정확하게 입력하지 않았습니다.', + badCustomVal: '입력 값이 정확하지 않습니다.', + badInt: '입력 값이 숫자가 아닙니다.', + badSecurityNumber: '주민등록번호가 정확하지 않습니다.', + badStrength: '암호를 더 복잡하게 조합해야 합니다.', + badNumberOfSelectedOptionsStart: '최소한 ', + badNumberOfSelectedOptionsEnd: ' 개 항목 이상을 선택해야 합니다.', + badAlphaNumeric: '입력 값은 문자와 숫자만 허용합니다.', + badAlphaNumericAndExtra: '입력 값은 문자와 숫자와 ', + badAlphaNumericExtra: ' 만 허용합니다.', + badAlphaNumericAndExtraAndSpaces: '입력 값은 문자와 숫자와 ', + andSpaces: ' 와 빈문자(spaces)만 허용합니다. ', + wrongFileSize: '업로드 하려고 하는 파일의 크기가 너무 큽니다. (최대 %s)', + wrongFileType: '파일 타입은 %s 만 허용합니다.', + groupCheckedRangeStart: '', + groupCheckedEnd: ' 개 항목을 선택해야 합니다.', + groupCheckedTooFewStart: '최소한 ', + groupCheckedTooFewEnd: ' 개 항목 이상을 선택해야 합니다.', + groupCheckedTooManyStart: '', + groupCheckedTooManyEnd: ' 개 항목 이하를 선택해야 합니다.', + badCreditCard: '신용카드번호를 정확하지 않습니다.', + badCVV: 'CVV 번호가 정확하지 않습니다.', + wrongFileDim : '잘못된 이미지 크기 ,', + imageTooTall : '이미지 길이가 ', + imageTooTallEnd : ' 보다 길어야 합니다.', + imageTooWide : '이미지 넓이가 ', + imageTooWideEnd : ' 보다 넓어야 합니다.', + imageTooSmall : '이미지 크기가 너무 작습니다.', + min : 'min', + max : 'max', + imageRatioNotAccepted : '이미지 비율이 맞지 않습니다.', + }; + + }); + +})(jQuery, window); diff --git a/src/lang/nl.js b/src/lang/nl.js new file mode 100644 index 0000000..f6df88e --- /dev/null +++ b/src/lang/nl.js @@ -0,0 +1,63 @@ +/** + * jQuery Form Validator + * ------------------------------------------ + * + * Dutch language package + * + * @website http://formvalidator.net/ + * @license MIT + */ +(function ($, window) { + + 'use strict'; + + $.formUtils.registerLoadedModule('lang/nl'); + + $(window).bind('validatorsLoaded', function () { + + $.formUtils.LANG = { + andSpaces: ' en spaties ', + badAlphaNumeric: 'De ingevoerde waarde mag alleen alfabetische karakters bevatten', + badAlphaNumericExtra: ' en ', + badCVV: 'Het CVV nummer was onjuist', + badCreditCard: 'Het creditcardnummer is onjuist', + badCustomVal: 'De ingevoerde waarde is onjuist', + badDate: 'U heeft niet de juiste datum aangegeven', + badDomain: 'Incorrect domein', + badEmail: 'U heeft een onjuist e-mailadres ingevoerd ', + badInt: 'De ingevoerde waarde was een onjuist getal', + badNumberOfSelectedOptionsEnd: ' antwoorden', + badNumberOfSelectedOptionsStart: 'U moet tenminste ', + badSecurityAnswer: 'U heeft de beveilingsvraag onjuist beantwoord', + badSecurityNumber: 'Uw burgerservicenummer was incorrect', + badStrength: 'Het wachtwoord is niet veilig genoeg', + badTelephone: 'U heeft een onjuist telefoonnummer ingevoerd', + badTime: 'U heeft een incorrecte tijd aangegeven', + badUrl: 'De ingevoerde waarde is geen correcte URL', + badreCaptcha: 'Bevestig a.u.b. dat u geen robot bent', + errorTitle: 'Indienen van formulier mislukt!', + groupCheckedEnd: ' item(s)', + groupCheckedRangeStart: 'Kies a.u.b. tussen ', + groupCheckedTooFewStart: 'Kies a.u.b. ten minste ', + groupCheckedTooManyStart: 'Kies a.u.b. maximaal ', + imageRatioNotAccepted: 'De afbeeldingsverhouding wordt niet geaccepteerd', + imageTooSmall: 'de afbeelding was te klein', + imageTooTall: 'de afbeelding kan niet langer zijn dan', + imageTooWide: 'de afbeelding kan niet wijder zijn dan', + lengthBadEnd: ' karakters', + lengthBadStart: 'De ingevoerde waarde moet liggen tussen ', + lengthTooLongStart: 'De ingevoerde waarde is langer dan ', + lengthTooShortStart: 'De ingevoerde waarde is korter dan ', + max: 'max', + min: 'min', + notConfirmed: 'Invoerwaarden konden niet worden bevestigd', + requiredField: 'Dit is een verplicht veld', + requiredFields: 'U heeft niet alle verplichte velden ingevuld', + wrongFileDim: 'Incorrecte afbeeldingsafmetingen,', + wrongFileSize: 'Het bestand dat u probeert te uploaden is te groot (max %s)', + wrongFileType: 'Alleen type %s bestanden zijn toegestaan' + }; + + }); + +})(jQuery, window); diff --git a/src/lang/no.js b/src/lang/no.js new file mode 100644 index 0000000..8aca430 --- /dev/null +++ b/src/lang/no.js @@ -0,0 +1,63 @@ +/** + * jQuery Form Validator + * ------------------------------------------ + * + * Norwegian language package + * + * @website http://formvalidator.net/ + * @license MIT + */ +(function ($, window) { + + 'use strict'; + + $.formUtils.registerLoadedModule('lang/no'); + + $(window).bind('validatorsLoaded', function () { + + $.formUtils.LANG = { + andSpaces: ' og mellomrom ', + badAlphaNumeric: 'Inntastningsverdien kan kun inneholde alfanumeriske tegn ', + badAlphaNumericExtra: ' og ', + badCVV: 'CVV-nummeret var ikke korrekt', + badCreditCard: 'Kredittkortnummeret er ikke korrekt', + badCustomVal: 'Inntastingsverdien er ikke korrekt', + badDate: 'Du har ikke oppgitt en korrekt dato', + badDomain: 'Ukorrekt domeneverdi', + badEmail: 'Du har ikke oppgitt en korrekt e-postadresse', + badInt: 'Inntastingsverdien er ikke et korrekt tall', + badNumberOfSelectedOptionsEnd: ' svar', + badNumberOfSelectedOptionsStart: 'Du må velge minst ', + badSecurityAnswer: 'Du har ikke oppgitt et korrekt svar på sikkerhetsspørsmålet', + badSecurityNumber: 'Ditt personnummer var ukorrekt', + badStrength: 'Passordet er ikke sterkt nok', + badTelephone: 'Du har ikke oppgitt et korrekt telefonnummer', + badTime: 'Du har ikke oppgitt en korrekt tid', + badUrl: 'Inntastingsverdien er ikke en korrekt URL', + badreCaptcha: 'Vennligst bekreft at du ikke er en robot', + errorTitle: 'Innsending av skjemaet feilet!', + groupCheckedEnd: ' ting', + groupCheckedRangeStart: 'Vennligst velg mellom ', + groupCheckedTooFewStart: 'Vennligst velg minst ', + groupCheckedTooManyStart: 'Vennligst velg maksimum ', + imageRatioNotAccepted: 'Bildestørrelse ikke akseptert', + imageTooSmall: 'bildet er for lite', + imageTooTall: 'bildet kan ikke være høyere enn', + imageTooWide: 'bildet kan ikke være bredere enn', + lengthBadEnd: 'tegn', + lengthBadStart: 'Inntastingsverdien må være mellom ', + lengthTooLongStart: 'Inntastingsverdien er lenger enn ', + lengthTooShortStart: 'Inntastingsverdien er kortere enn ', + max: 'maks', + min: 'min', + notConfirmed: 'Inntastingsverdier kunne ikke bekreftes', + requiredField: 'Dette er et obligatorisk felt', + requiredFields: 'Du har ikke besvart alle obligatoriske felt', + wrongFileDim: 'Ukorrekte bildedimensjoner,', + wrongFileSize: 'Bildet du prøver å laste opp er for stort (max %s)', + wrongFileType: 'Kun filer av type %s er tillatt' + }; + + }); + +})(jQuery, window); diff --git a/form-validator/lang/pl.dev.js b/src/lang/pl.js similarity index 85% rename from form-validator/lang/pl.dev.js rename to src/lang/pl.js index be519ff..5258b0d 100644 --- a/form-validator/lang/pl.dev.js +++ b/src/lang/pl.js @@ -6,12 +6,13 @@ * * @website http://formvalidator.net/ * @license MIT - * @version 2.2.83 */ (function($, window) { 'use strict'; + $.formUtils.registerLoadedModule('lang/pl'); + $(window).bind('validatorsLoaded', function() { $.formUtils.LANG = { @@ -35,6 +36,8 @@ badInt: 'Wprowadzono nieprawidłowy numer', badSecurityNumber: 'Wprowadzono niepoprawny numer ubezpieczenia społecznego', badUKVatAnswer: 'Wprowadzono niepoprawny brytyjski numer VAT', + badUKNin: 'Wprowadzono niepoprawny brytyjski numer NIP', + badUKUtr: 'Wprowadzono niepoprawny brytyjski numer podatnika', badStrength: 'Twoje hasło nie jest wystarczająco mocne', badNumberOfSelectedOptionsStart: 'Musisz wybrać przynajmniej ', badNumberOfSelectedOptionsEnd: ' odpowiedzi', @@ -57,7 +60,11 @@ imageRatioNotAccepted: 'Proporcje obrazu są niepoprawne', badBrazilTelephoneAnswer: 'Wprowadzono niepoprawny numer telefonu', badBrazilCEPAnswer: 'Wprowadzono niepoprawny CEP', - badBrazilCPFAnswer: 'Wprowadzono niepoprawny CPF' + badBrazilCPFAnswer: 'Wprowadzono niepoprawny CPF', + badPlPesel: 'Wprowadzono niepoprawny numer PESEL', + badPlNip: 'Wprowadzono niepoprawny numer NIP', + badPlRegon: 'Wprowadzono niepoprawny numer REGON', + badreCaptcha: 'Potwierdź że nie jesteś botem!' }; }); diff --git a/form-validator/lang/pt.dev.js b/src/lang/pt.js similarity index 98% rename from form-validator/lang/pt.dev.js rename to src/lang/pt.js index 75826cd..d956150 100644 --- a/form-validator/lang/pt.dev.js +++ b/src/lang/pt.js @@ -6,12 +6,13 @@ * * @website http://formvalidator.net/ * @license MIT - * @version 2.2.83 */ (function($, window) { 'use strict'; + $.formUtils.registerLoadedModule('lang/pt'); + $(window).bind('validatorsLoaded', function() { $.formUtils.LANG = { diff --git a/form-validator/lang/ro.dev.js b/src/lang/ro.js similarity index 98% rename from form-validator/lang/ro.dev.js rename to src/lang/ro.js index 612a34e..d223cad 100644 --- a/form-validator/lang/ro.dev.js +++ b/src/lang/ro.js @@ -6,12 +6,13 @@ * * @website http://formvalidator.net/ * @license MIT - * @version 2.2.83 */ (function($, window) { 'use strict'; + $.formUtils.registerLoadedModule('lang/ro'); + $(window).bind('validatorsLoaded', function() { $.formUtils.LANG = { diff --git a/form-validator/lang/ru.dev.js b/src/lang/ru.js similarity index 98% rename from form-validator/lang/ru.dev.js rename to src/lang/ru.js index 9c3c3c7..f281dd2 100644 --- a/form-validator/lang/ru.dev.js +++ b/src/lang/ru.js @@ -6,11 +6,12 @@ * * @website http://formvalidator.net/ * @license MIT - * @version 2.2.85 */ (function($, window) { - "use strict"; + 'use strict'; + + $.formUtils.registerLoadedModule('lang/ru'); $(window).bind('validatorsLoaded', function() { diff --git a/form-validator/lang/sv.dev.js b/src/lang/sv.js similarity index 98% rename from form-validator/lang/sv.dev.js rename to src/lang/sv.js index 18ea574..3ce91b3 100644 --- a/form-validator/lang/sv.dev.js +++ b/src/lang/sv.js @@ -6,12 +6,13 @@ * * @website http://formvalidator.net/ * @license MIT - * @version 2.2.83 */ (function($, window) { 'use strict'; + $.formUtils.registerLoadedModule('lang/sv'); + $(window).bind('validatorsLoaded', function() { $.formUtils.LANG = { diff --git a/src/lang/tr.js b/src/lang/tr.js new file mode 100644 index 0000000..f76d50e --- /dev/null +++ b/src/lang/tr.js @@ -0,0 +1,79 @@ +/** + * jQuery Form Validator + * ------------------------------------------ + * + * Turkish language package + * + * @website http://formvalidator.net/ + * @license MIT + */ +(function($, window) { + + 'use strict'; + + $.formUtils.registerLoadedModule('lang/tr'); + + $(window).bind('validatorsLoaded', function() { + + $.formUtils.LANG = { + errorTitle: 'Form gönderilemedi!', + requiredField: 'Boş bırakılamaz', + requiredFields: 'Gerekli tüm alanları cevaplamadınız', + badTime: 'Geçersiz zaman girdiniz', + badEmail: 'Geçersiz e-posta adresi girdiniz', + badTelephone: 'Geçersiz telefon numarası girdiniz', + badSecurityAnswer: 'Güvenlik sorusuna doğru cevap vermediniz', + badDate: 'Geçersiz tarih girdiniz', + lengthBadStart: 'Girilen değer ', + lengthBadEnd: ' karakter olmalıdır', + lengthTooLongStart: 'Girilen değer en fazla ', + lengthTooShortStart: 'Girilen değer en az ', + notConfirmed: 'Girilen değerler uyuşmuyor', + badDomain: 'Geçersiz alan adı girdiniz', + badUrl: 'Geçersiz bağlantı girdiniz', + badCustomVal: 'Geçersiz değer girdiniz', + andSpaces: ' ve boşluk ', + badInt: 'Girilen değer sayı olamlıdır', + badSecurityNumber: 'Geçersiz güvenlik kodu girdiniz', + badUKVatAnswer: 'Geçersiz İngiltere KDV numarası girdiniz', + badUKNin: 'Geçersiz İngiltere NIN numarası girdiniz', + badUKUtr: 'Geçersiz İngiltere UTR numarası girdiniz', + badStrength: 'Şifreniz yeterince güçlü değil', + badNumberOfSelectedOptionsStart: 'En az ', + badNumberOfSelectedOptionsEnd: ' cevap seçmeniz gerekiyor', + badAlphaNumeric: 'Kabul edilen değer sadece alfanümerik karakterler ', + badAlphaNumericExtra: ' ve ', + wrongFileSize: 'Yüklemeye çalıştığınız dosya (en fazla %s) çok büyük', + wrongFileType: 'Yalnızca %s türündeki dosyaları yükleyebilirsiniz', + groupCheckedRangeStart: 'Lütfen ', + groupCheckedTooFewStart: 'Lütfen en az ', + groupCheckedTooManyStart: 'Lütfen en fazla ', + groupCheckedEnd: ' adet seçiniz', + badCreditCard: 'Geçersiz kredi kartı numarası girdiniz', + badCVV: 'Geçersiz CVV numarası girdiniz', + wrongFileDim: 'Hatalı resim yüklediniz çünkü', + imageTooTall: 'resim daha uzun olamaz', + imageTooWide: 'resim daha geniş olamaz', + imageTooSmall: 'görüntü çok küçük', + min: 'min', + max: 'max', + imageRatioNotAccepted: 'Kabul edilmeye görüntü oranı', + badBrazilTelephoneAnswer: 'Geçersiz telefon numarası girdiniz', + badBrazilCEPAnswer: 'Geçersiz Brezilya posta kodu girdiniz', + badBrazilCPFAnswer: 'Geçersiz Brezilya mükellef kayıt kimliği girdiniz', + badPlPesel: 'Geçersiz Polonya kişisel kimlik numarası girdiniz', + badPlNip: 'Geçersiz DKV girdiniz', + badPlRegon: 'Geçersiz Polonya ticari kimlik numarası girdiniz', + badreCaptcha: 'Lütfen bot olmadığınızı doğrulayın', + passwordComplexityStart: 'Şifreniz en az ', + passwordComplexitySeparator: ', ', + passwordComplexityUppercaseInfo: ' büyük harf', + passwordComplexityLowercaseInfo: ' küçük harf', + passwordComplexitySpecialCharsInfo: ' özel karakter', + passwordComplexityNumericCharsInfo: ' sayısal karakter', + passwordComplexityEnd: ' içermelidir' + }; + + }); + +})(jQuery, window); diff --git a/src/lang/vi.js b/src/lang/vi.js new file mode 100644 index 0000000..9aa01f5 --- /dev/null +++ b/src/lang/vi.js @@ -0,0 +1,62 @@ +/** + * jQuery Form Validator + * ------------------------------------------ + * + * Vietnamese language package + * + * @website http://formvalidator.net/ + * @license MIT + */ +(function($, window) { + + 'use strict'; + + $.formUtils.registerLoadedModule('lang/vi'); + + $(window).bind('validatorsLoaded', function() { + + $.formUtils.LANG = { + errorTitle: 'Có lỗi trong qua trình gửi dữ liệu!', + requiredFields: 'Bạn chưa nhập đủ các thông tin bắt buộc', + badTime: 'Thời gian chưa chính xác', + badEmail: 'Địa chỉ email chưa chính xác', + badTelephone: 'Số điện thoại chưa chính xác', + badSecurityAnswer: 'Câu hỏi bảo mật chưa chính xác', + badDate: 'Ngày tháng chưa chính xác', + lengthBadStart: 'Yêu cầu nhập từ ', + lengthBadEnd: ' ký tự', + lengthTooLongStart: 'Dữ liệu quá dài, yêu cầu ít hơn ', + lengthTooShortStart: 'Dữ liệu quá ngắn, yêu cầu nhiều hơn ', + notConfirmed: 'Dữ liệu không được xác nhận', + badDomain: 'Tên miền chưa chính xác', + badUrl: 'Địa chỉ website chưa chính xác', + badCustomVal: 'Dữ liệu chưa chính xác', + andSpaces: ' và các khoảng cách ', + badInt: 'Yêu cầu chỉ nhập số', + badSecurityNumber: 'Mã bảo mật chưa chính xác', + badUKVatAnswer: 'UK VAT chưa chính xác', + badStrength: 'Mật khẩu chưa đủ độ phức tạp', + badNumberOfSelectedOptionsStart: 'Bạn cần tích chọn ít nhất ', + badNumberOfSelectedOptionsEnd: ' lựa chọn', + badAlphaNumeric: 'Yêu cầu chỉ nhập chữ hoặc số ', + badAlphaNumericExtra: ' và ', + wrongFileSize: 'File của bạn quá lớn (chỉ chấp nhận file không quá %s)', + wrongFileType: 'Chỉ cho phép các định dạng file sau: %s', + groupCheckedRangeStart: 'Vui lòng tích chọn từ ', + groupCheckedTooFewStart: 'Vui lòng tích chọn ít nhất ', + groupCheckedTooManyStart: 'Vui lòng tích chọn nhiều nhất ', + groupCheckedEnd: ' lựa chọn', + badCreditCard: 'Mã thẻ chưa chính xác', + badCVV: 'Mã bảo mật (CVV) chưa chính xác', + wrongFileDim: 'Kích thước ảnh chưa chính xác,', + imageTooTall: 'Chiều cao ảnh không được vượt quá', + imageTooWide: 'Chiều rộng ảnh không được vượt quá', + imageTooSmall: 'Kích thước ảnh quá nhỏ', + min: 'nhỏ nhất', + max: 'lớn nhất', + imageRatioNotAccepted: 'Tỷ lệ ảnh chưa chính xác' + }; + + }); + +})(jQuery, window); diff --git a/src/main/async.js b/src/main/async.js new file mode 100644 index 0000000..f2cc135 --- /dev/null +++ b/src/main/async.js @@ -0,0 +1,167 @@ +/** + */ +(function ($, window, undefined) { + + var disableFormSubmit = function () { + return false; + }, + lastFormEvent = null, + HaltManager = { + numHalted: 0, + haltValidation: function($form) { + this.numHalted++; + $.formUtils.haltValidation = true; + $form + .unbind('submit', disableFormSubmit) + .bind('submit', disableFormSubmit) + .find('*[type="submit"]') + .addClass('disabled') + .attr('disabled', 'disabled'); + }, + unHaltValidation: function($form) { + this.numHalted--; + if (this.numHalted === 0) { + $.formUtils.haltValidation = false; + $form + .unbind('submit', disableFormSubmit) + .find('*[type="submit"]') + .removeClass('disabled') + .removeAttr('disabled', 'disabled'); + } + } + }; + + function AsyncValidation($form, $input) { + this.$form = $form; + this.$input = $input; + this.reset(); + $input.on('change paste', this.reset.bind(this)); + } + + AsyncValidation.prototype.reset = function() { + this.haltedFormValidation = false; + this.hasRun = false; + this.isRunning = false; + this.result = undefined; + }; + + AsyncValidation.prototype.run = function(eventContext, callback) { + if (eventContext === 'keyup') { + return null; + } else if (this.isRunning) { + lastFormEvent = eventContext; + if (!this.haltedFormValidation) { + HaltManager.haltValidation(); + this.haltedFormValidation = true; + } + return null; // Waiting for result + } else if(this.hasRun) { + //this.$input.one('keyup change paste', this.reset.bind(this)); + return this.result; + } else { + lastFormEvent = eventContext; + HaltManager.haltValidation(this.$form); + this.haltedFormValidation = true; + this.isRunning = true; + this.$input + .attr('disabled', 'disabled') + .addClass('async-validation'); + this.$form.addClass('async-validation'); + + callback(function(result) { + this.done(result); + }.bind(this)); + + return null; + } + }; + + AsyncValidation.prototype.done = function(result) { + this.result = result; + this.hasRun = true; + this.isRunning = false; + this.$input + .removeAttr('disabled') + .removeClass('async-validation'); + this.$form.removeClass('async-validation'); + if (this.haltedFormValidation) { + HaltManager.unHaltValidation(this.$form); + if (lastFormEvent === 'submit') { + this.$form.trigger('submit'); + } else { + this.$input.trigger('validation.revalidate'); + } + } + }; + + AsyncValidation.loadInstance = function(validatorName, $input, $form) { + // Return async validator attached to this input element + // or create a new async validator and attach it to the input + var asyncValidation, + input = $input.get(0); + + if (!input.asyncValidators) { + input.asyncValidators = {}; + } + + if (input.asyncValidators[validatorName]) { + asyncValidation = input.asyncValidators[validatorName]; + } else { + asyncValidation = new AsyncValidation($form, $input); + input.asyncValidators[validatorName] = asyncValidation; + } + + return asyncValidation; + }; + + $.formUtils = $.extend($.formUtils || {}, { + + /** + * @deprecated + * @param validatorName + * @param $input + * @param $form + */ + asyncValidation: function(validatorName, $input, $form) { + // @todo: Remove when moving up to version 3.0 + this.warn('Use of deprecated function $.formUtils.asyncValidation, use $.formUtils.addAsyncValidator() instead'); + return AsyncValidation.loadInstance(validatorName, $input, $form); + }, + + /** + * @param {Object} asyncValidator + */ + addAsyncValidator: function (asyncValidator) { + var validator = $.extend({}, asyncValidator), + originalValidatorFunc = validator.validatorFunction; + validator.async = true; + validator.validatorFunction = function (value, $el, config, language, $form, eventContext) { + var asyncValidation = AsyncValidation.loadInstance(this.name, $el, $form); + return asyncValidation.run(eventContext, function(done) { + originalValidatorFunc.apply(validator, [ + done, value, $el, config, language, $form, eventContext + ]); + }); + }; + this.addValidator(validator); + } + }); + + // Tag elements having async validators + $(window).bind('validatorsLoaded formValidationSetup', function (evt, $form) { + if (!$form) { + $form = $('form'); + } + $form.find('[data-validation]').each(function () { + var $input = $(this); + $input.valAttr('async', false); + $.each($.split($input.attr('data-validation')), function (i, validatorName) { + var validator = $.formUtils.validators['validate_'+validatorName]; + if (validator && validator.async) { + $input.valAttr('async', 'yes'); + } + }); + }); + }); + +})(jQuery, window); diff --git a/src/main/core-validators.js b/src/main/core-validators.js new file mode 100644 index 0000000..8f2f409 --- /dev/null +++ b/src/main/core-validators.js @@ -0,0 +1,354 @@ +/** + * File declaring all default validators. + */ +(function($) { + + /* + * Validate email + */ + $.formUtils.addValidator({ + name: 'email', + validatorFunction: function (email) { + + var emailParts = email.toLowerCase().split('@'), + localPart = emailParts[0], + domain = emailParts[1]; + + if (localPart && domain) { + + if( localPart.indexOf('"') === 0 ) { + var len = localPart.length; + localPart = localPart.replace(/\"/g, ''); + if( localPart.length !== (len-2) ) { + return false; // It was not allowed to have more than two apostrophes + } + } + + return $.formUtils.validators.validate_domain.validatorFunction(emailParts[1]) && + localPart.indexOf('.') !== 0 && + localPart.substring(localPart.length-1, localPart.length) !== '.' && + localPart.indexOf('..') === -1 && + !(/[^\w\+\.\-\#\-\_\~\!\$\&\'\(\)\*\+\,\;\=\:]/.test(localPart)); + } + + return false; + }, + errorMessage: '', + errorMessageKey: 'badEmail' + }); + + /* + * Validate domain name + */ + $.formUtils.addValidator({ + name: 'domain', + validatorFunction: function (val) { + return val.length > 0 && + val.length <= 253 && // Including sub domains + !(/[^a-zA-Z0-9]/.test(val.slice(-2))) && !(/[^a-zA-Z0-9]/.test(val.substr(0, 1))) && !(/[^a-zA-Z0-9\.\-]/.test(val)) && + val.split('..').length === 1 && + val.split('.').length > 1; + }, + errorMessage: '', + errorMessageKey: 'badDomain' + }); + + /* + * Validate required + */ + $.formUtils.addValidator({ + name: 'required', + validatorFunction: function (val, $el, config, language, $form) { + switch ($el.attr('type')) { + case 'checkbox': + return $el.is(':checked'); + case 'radio': + return $form.find('input[name="' + $el.attr('name') + '"]').filter(':checked').length > 0; + default: + return $.trim(val) !== ''; + } + }, + errorMessage: '', + errorMessageKey: function(config) { + if (config.errorMessagePosition === 'top' || typeof config.errorMessagePosition === 'function') { + return 'requiredFields'; + } + else { + return 'requiredField'; + } + } + }); + + /* + * Validate length range + */ + $.formUtils.addValidator({ + name: 'length', + validatorFunction: function (val, $el, conf, lang) { + var lengthAllowed = $el.valAttr('length'), + type = $el.attr('type'); + + if (lengthAllowed === undefined) { + alert('Please add attribute "data-validation-length" to ' + $el[0].nodeName + ' named ' + $el.attr('name')); + return true; + } + + // check if length is above min, below max or within range. + var len = type === 'file' && $el.get(0).files !== undefined ? $el.get(0).files.length : val.length, + lengthCheckResults = $.formUtils.numericRangeCheck(len, lengthAllowed), + checkResult; + + switch (lengthCheckResults[0]) { // outside of allowed range + case 'out': + this.errorMessage = lang.lengthBadStart + lengthAllowed + lang.lengthBadEnd; + checkResult = false; + break; + // too short + case 'min': + this.errorMessage = lang.lengthTooShortStart + lengthCheckResults[1] + lang.lengthBadEnd; + checkResult = false; + break; + // too long + case 'max': + this.errorMessage = lang.lengthTooLongStart + lengthCheckResults[1] + lang.lengthBadEnd; + checkResult = false; + break; + // ok + default: + checkResult = true; + } + + return checkResult; + }, + errorMessage: '', + errorMessageKey: '' + }); + + /* + * Validate url + */ + $.formUtils.addValidator({ + name: 'url', + validatorFunction: function (url) { + // written by Scott Gonzalez: http://projects.scottsplayground.com/iri/ + // - Victor Jonsson added support for arrays in the url ?arg[]=sdfsdf + // - General improvements made by Stéphane Moureau + + var urlFilter = /^(https?|ftp):\/\/((((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|\[|\]|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i; + if (urlFilter.test(url)) { + var domain = url.split('://')[1], + domainSlashPos = domain.indexOf('/'); + + if (domainSlashPos > -1) { + domain = domain.substr(0, domainSlashPos); + } + + return $.formUtils.validators.validate_domain.validatorFunction(domain); // todo: add support for IP-addresses + } + return false; + }, + errorMessage: '', + errorMessageKey: 'badUrl' + }); + + /* + * Validate number (floating or integer) + */ + $.formUtils.addValidator({ + name: 'number', + validatorFunction: function (val, $el, conf) { + if (val !== '') { + var allowing = $el.valAttr('allowing') || '', + decimalSeparator = $el.valAttr('decimal-separator') || conf.decimalSeparator, + allowsRange = false, + begin, end, + steps = $el.valAttr('step') || '', + allowsSteps = false, + sanitize = $el.attr('data-sanitize') || '', + isFormattedWithNumeral = sanitize.match(/(^|[\s])numberFormat([\s]|$)/i); + + if (isFormattedWithNumeral) { + if (!window.numeral) { + throw new ReferenceError('The data-sanitize value numberFormat cannot be used without the numeral' + + ' library. Please see Data Validation in http://www.formvalidator.net for more information.'); + } + //Unformat input first, then convert back to String + if (val.length) { + val = String(numeral().unformat(val)); + } + } + + if (allowing.indexOf('number') === -1) { + allowing += ',number'; + } + + if (allowing.indexOf('negative') === -1 && val.indexOf('-') === 0) { + return false; + } + + if (allowing.indexOf('range') > -1) { + begin = parseFloat(allowing.substring(allowing.indexOf('[') + 1, allowing.indexOf(';'))); + end = parseFloat(allowing.substring(allowing.indexOf(';') + 1, allowing.indexOf(']'))); + allowsRange = true; + } + + if (steps !== '') { + allowsSteps = true; + } + + if (decimalSeparator === ',') { + if (val.indexOf('.') > -1) { + return false; + } + // Fix for checking range with floats using , + val = val.replace(',', '.'); + } + if (val.replace(/[0-9-]/g, '') === '' && (!allowsRange || (val >= begin && val <= end)) && (!allowsSteps || (val % steps === 0))) { + return true; + } + + if (allowing.indexOf('float') > -1 && val.match(new RegExp('^([0-9-]+)\\.([0-9]+)$')) !== null && (!allowsRange || (val >= begin && val <= end)) && (!allowsSteps || (val % steps === 0))) { + return true; + } + } + return false; + }, + errorMessage: '', + errorMessageKey: 'badInt' + }); + + /* + * Validate alpha numeric + */ + $.formUtils.addValidator({ + name: 'alphanumeric', + validatorFunction: function (val, $el, conf, language) { + var patternStart = '^([a-zA-Z0-9', + patternEnd = ']+)$', + additionalChars = $el.valAttr('allowing'), + pattern = '', + hasSpaces = false; + + if (additionalChars) { + pattern = patternStart + additionalChars + patternEnd; + var extra = additionalChars.replace(/\\/g, ''); + if (extra.indexOf(' ') > -1) { + hasSpaces = true; + extra = extra.replace(' ', ''); + extra += language.andSpaces || $.formUtils.LANG.andSpaces; + } + + if(language.badAlphaNumericAndExtraAndSpaces && language.badAlphaNumericAndExtra) { + if(hasSpaces) { + this.errorMessage = language.badAlphaNumericAndExtraAndSpaces + extra; + } else { + this.errorMessage = language.badAlphaNumericAndExtra + extra + language.badAlphaNumericExtra; + } + } else { + this.errorMessage = language.badAlphaNumeric + language.badAlphaNumericExtra + extra; + } + } else { + pattern = patternStart + patternEnd; + this.errorMessage = language.badAlphaNumeric; + } + + return new RegExp(pattern).test(val); + }, + errorMessage: '', + errorMessageKey: '' + }); + + /* + * Validate against regexp + */ + $.formUtils.addValidator({ + name: 'custom', + validatorFunction: function (val, $el) { + var regexp = new RegExp($el.valAttr('regexp')); + return regexp.test(val); + }, + errorMessage: '', + errorMessageKey: 'badCustomVal' + }); + + /* + * Validate date + */ + $.formUtils.addValidator({ + name: 'date', + validatorFunction: function (date, $el, conf) { + var dateFormat = $el.valAttr('format') || conf.dateFormat || 'yyyy-mm-dd', + addMissingLeadingZeros = $el.valAttr('require-leading-zero') === 'false'; + return $.formUtils.parseDate(date, dateFormat, addMissingLeadingZeros) !== false; + }, + errorMessage: '', + errorMessageKey: 'badDate' + }); + + + /* + * Validate group of checkboxes, validate qty required is checked + * written by Steve Wasiura : http://stevewasiura.waztech.com + * element attrs + * data-validation="checkbox_group" + * data-validation-qty="1-2" // min 1 max 2 + * data-validation-error-msg="chose min 1, max of 2 checkboxes" + */ + $.formUtils.addValidator({ + name: 'checkbox_group', + validatorFunction: function (val, $el, conf, lang, $form) { + // preset return var + var isValid = true, + // get name of element. since it is a checkbox group, all checkboxes will have same name + elname = $el.attr('name'), + // get checkboxes and count the checked ones + $checkBoxes = $('input[type=checkbox][name^="' + elname + '"]', $form), + checkedCount = $checkBoxes.filter(':checked').length, + // get el attr that specs qty required / allowed + qtyAllowed = $el.valAttr('qty'); + + if (qtyAllowed === undefined) { + var elementType = $el.get(0).nodeName; + alert('Attribute "data-validation-qty" is missing from ' + elementType + ' named ' + $el.attr('name')); + } + + // call Utility function to check if count is above min, below max, within range etc. + var qtyCheckResults = $.formUtils.numericRangeCheck(checkedCount, qtyAllowed); + + // results will be array, [0]=result str, [1]=qty int + switch (qtyCheckResults[0]) { + // outside allowed range + case 'out': + this.errorMessage = lang.groupCheckedRangeStart + qtyAllowed + lang.groupCheckedEnd; + isValid = false; + break; + // below min qty + case 'min': + this.errorMessage = lang.groupCheckedTooFewStart + qtyCheckResults[1] + (lang.groupCheckedTooFewEnd || lang.groupCheckedEnd); + isValid = false; + break; + // above max qty + case 'max': + this.errorMessage = lang.groupCheckedTooManyStart + qtyCheckResults[1] + (lang.groupCheckedTooManyEnd || lang.groupCheckedEnd); + isValid = false; + break; + // ok + default: + isValid = true; + } + + if( !isValid ) { + var _triggerOnBlur = function() { + $checkBoxes.unbind('click', _triggerOnBlur); + $checkBoxes.filter('*[data-validation]').validateInputOnBlur(lang, conf, false, 'blur'); + }; + $checkBoxes.bind('click', _triggerOnBlur); + } + + return isValid; + } + // errorMessage : '', // set above in switch statement + // errorMessageKey: '' // not used + }); + +})(jQuery); diff --git a/src/main/deprecated.js b/src/main/deprecated.js new file mode 100644 index 0000000..35b7c55 --- /dev/null +++ b/src/main/deprecated.js @@ -0,0 +1,110 @@ +/** + * Deprecated functions and attributes + * @todo: Remove in release of 3.0 + */ +(function ($, undefined) { + + 'use strict'; + + /** + * @deprecated + * @param language + * @param conf + */ + $.fn.validateForm = function (language, conf) { + $.formUtils.warn('Use of deprecated function $.validateForm, use $.isValid instead'); + return this.isValid(language, conf, true); + }; + + $(window) + .on('formValidationPluginInit', function(evt, config) { + convertDeprecatedLangCodeToISO6391(config); + addSupportForCustomErrorMessageCallback(config); + addSupportForElementReferenceInPositionParam(config); + }) + .on('validatorsLoaded formValidationSetup', function(evt, $form) { + if( !$form ) { + $form = $('form'); + } + addSupportForValidationDependingOnCheckedInput($form); + }); + + + function addSupportForCustomErrorMessageCallback(config) { + if (config && + config.errorMessagePosition === 'custom' && + typeof config.errorMessageCustom === 'function') { + + $.formUtils.warn('Use of deprecated function errorMessageCustom, use config.submitErrorMessageCallback instead'); + + config.submitErrorMessageCallback = function($form, errorMessages) { + config.errorMessageCustom( + $form, + config.language.errorTitle, + errorMessages, + config + ); + }; + } + } + + function addSupportForElementReferenceInPositionParam(config) { + if (config.errorMessagePosition && typeof config.errorMessagePosition === 'object') { + $.formUtils.warn('Deprecated use of config parameter errorMessagePosition, use config.submitErrorMessageCallback instead'); + var $errorMessageContainer = config.errorMessagePosition; + config.errorMessagePosition = 'top'; + config.submitErrorMessageCallback = function() { + return $errorMessageContainer; + }; + } + } + + function addSupportForValidationDependingOnCheckedInput($form) { + var $inputsDependingOnCheckedInputs = $form.find('[data-validation-if-checked]'); + if ($inputsDependingOnCheckedInputs.length) { + $.formUtils.warn( + 'Detected use of attribute "data-validation-if-checked" which is '+ + 'deprecated. Use "data-validation-depends-on" provided by module "logic"' + ); + } + + $inputsDependingOnCheckedInputs + .on('beforeValidation', function() { + + var $elem = $(this), + nameOfDependingInput = $elem.valAttr('if-checked'); + + // Set the boolean telling us that the validation depends + // on another input being checked + var $dependingInput = $('input[name="' + nameOfDependingInput + '"]', $form), + dependingInputIsChecked = $dependingInput.is(':checked'), + valueOfDependingInput = ($.formUtils.getValue($dependingInput) || '').toString(), + requiredValueOfDependingInput = $elem.valAttr('if-checked-value'); + + if (!dependingInputIsChecked || !( + !requiredValueOfDependingInput || + requiredValueOfDependingInput === valueOfDependingInput + )) { + $elem.valAttr('skipped', true); + } + + }); + } + + function convertDeprecatedLangCodeToISO6391(config) { + var deprecatedLangCodes = { + se: 'sv', + cz: 'cs', + dk: 'da' + }; + + if (config.lang in deprecatedLangCodes) { + var newLangCode = deprecatedLangCodes[config.lang]; + $.formUtils.warn( + 'Deprecated use of lang code "'+config.lang+'" use "'+newLangCode+'" instead' + ); + config.lang = newLangCode; + } + } + +})(jQuery); diff --git a/src/main/dialogs.js b/src/main/dialogs.js new file mode 100644 index 0000000..1747812 --- /dev/null +++ b/src/main/dialogs.js @@ -0,0 +1,205 @@ +/** + * Utility methods used for displaying error messages (attached to $.formUtils) + */ +(function ($) { + + 'use strict'; + + var dialogs = { + + resolveErrorMessage: function($elem, validator, validatorName, conf, language) { + var errorMsgAttr = conf.validationErrorMsgAttribute + '-' + validatorName.replace('validate_', ''), + validationErrorMsg = $elem.attr(errorMsgAttr); + + if (!validationErrorMsg) { + validationErrorMsg = $elem.attr(conf.validationErrorMsgAttribute); + if (!validationErrorMsg) { + if (typeof validator.errorMessageKey !== 'function') { + validationErrorMsg = language[validator.errorMessageKey]; + } + else { + validationErrorMsg = language[validator.errorMessageKey(conf)]; + } + if (!validationErrorMsg) { + validationErrorMsg = validator.errorMessage; + } + } + } + return validationErrorMsg; + }, + getParentContainer: function ($elem) { + if ($elem.valAttr('error-msg-container')) { + return $($elem.valAttr('error-msg-container')); + } else { + var $parent = $elem.parent(); + if($elem.attr('type') === 'checkbox' && $elem.closest('.checkbox').length) { + $parent = $elem.closest('.checkbox').parent(); + } else if($elem.attr('type') === 'radio' && $elem.closest('.radio').length) { + $parent = $elem.closest('.radio').parent(); + } + if($parent.closest('.input-group').length) { + $parent = $parent.closest('.input-group').parent(); + } + return $parent; + } + }, + applyInputErrorStyling: function ($input, conf) { + $input + .addClass(conf.errorElementClass) + .removeClass(conf.successElementClass); + + this.getParentContainer($input) + .addClass(conf.inputParentClassOnError) + .removeClass(conf.inputParentClassOnSuccess); + + if (conf.borderColorOnError !== '') { + $input.css('border-color', conf.borderColorOnError); + } + }, + applyInputSuccessStyling: function($input, conf) { + $input.addClass(conf.successElementClass); + this.getParentContainer($input) + .addClass(conf.inputParentClassOnSuccess); + }, + removeInputStylingAndMessage: function($input, conf) { + + // Reset input css + $input + .removeClass(conf.successElementClass) + .removeClass(conf.errorElementClass) + .css('border-color', ''); + + var $parentContainer = dialogs.getParentContainer($input); + + // Reset parent css + $parentContainer + .removeClass(conf.inputParentClassOnError) + .removeClass(conf.inputParentClassOnSuccess); + + // Remove possible error message + if (typeof conf.inlineErrorMessageCallback === 'function') { + var $errorMessage = conf.inlineErrorMessageCallback($input, false, conf); + if ($errorMessage) { + $errorMessage.html(''); + } + } else { + $parentContainer + .find('.' + conf.errorMessageClass) + .remove(); + } + + }, + removeAllMessagesAndStyling: function($form, conf) { + + // Remove error messages in top of form + if (typeof conf.submitErrorMessageCallback === 'function') { + var $errorMessagesInTopOfForm = conf.submitErrorMessageCallback($form, false, conf); + if ($errorMessagesInTopOfForm) { + $errorMessagesInTopOfForm.html(''); + } + } else { + $form.find('.' + conf.errorMessageClass + '.alert').remove(); + } + + // Remove input css/messages + $form.find('.' + conf.errorElementClass + ',.' + conf.successElementClass).each(function() { + dialogs.removeInputStylingAndMessage($(this), conf); + }); + }, + setInlineMessage: function ($input, errorMsg, conf) { + + this.applyInputErrorStyling($input, conf); + + var custom = document.getElementById($input.attr('name') + '_err_msg'), + $messageContainer = false, + setErrorMessage = function ($elem) { + $.formUtils.$win.trigger('validationErrorDisplay', [$input, $elem]); + $elem.html(errorMsg); + }, + addErrorToMessageContainer = function() { + var $found = false; + $messageContainer.find('.' + conf.errorMessageClass).each(function () { + if (this.inputReferer === $input[0]) { + $found = $(this); + return false; + } + }); + if ($found) { + if (!errorMsg) { + $found.remove(); + } else { + setErrorMessage($found); + } + } else if(errorMsg !== '') { + $message = $('
    '); + setErrorMessage($message); + $message[0].inputReferer = $input[0]; + $messageContainer.prepend($message); + } + }, + $message; + + if (custom) { + // Todo: remove in 3.0 + $.formUtils.warn('Using deprecated element reference ' + custom.id); + $messageContainer = $(custom); + addErrorToMessageContainer(); + } else if (typeof conf.inlineErrorMessageCallback === 'function') { + $messageContainer = conf.inlineErrorMessageCallback($input, errorMsg, conf); + if (!$messageContainer) { + // Error display taken care of by inlineErrorMessageCallback + return; + } + addErrorToMessageContainer(); + } else { + var $parent = this.getParentContainer($input); + $message = $parent.find('.' + conf.errorMessageClass + '.help-block'); + if ($message.length === 0) { + $message = $('').addClass('help-block').addClass(conf.errorMessageClass); + $message.appendTo($parent); + } + setErrorMessage($message); + } + }, + setMessageInTopOfForm: function ($form, errorMessages, conf, lang) { + var view = '
    '+ + '{errorTitle}'+ + '
      {fields}
    '+ + '
    ', + $container = false; + + if (typeof conf.submitErrorMessageCallback === 'function') { + $container = conf.submitErrorMessageCallback($form, errorMessages, conf); + if (!$container) { + // message display taken care of by callback + return; + } + } + + var viewParams = { + errorTitle: lang.errorTitle, + fields: '', + errorMessageClass: conf.errorMessageClass + }; + + $.each(errorMessages, function (i, msg) { + viewParams.fields += '
  • '+msg+'
  • '; + }); + + $.each(viewParams, function(param, value) { + view = view.replace('{'+param+'}', value); + }); + + if ($container) { + $container.html(view); + } else { + $form.children().eq(0).before($(view)); + } + } + }; + + $.formUtils = $.extend($.formUtils || {}, { + dialogs: dialogs + }); + +})(jQuery); diff --git a/src/main/jquery-plugins.js b/src/main/jquery-plugins.js new file mode 100644 index 0000000..e0aa610 --- /dev/null +++ b/src/main/jquery-plugins.js @@ -0,0 +1,475 @@ +/** + * File declaring all methods if this plugin which is applied to $.fn. + */ +(function($, window, undefined) { + + 'use strict'; + + var _helpers = 0; + + + /** + * Assigns validateInputOnBlur function to elements blur event + * + * @param {Object} language Optional, will override $.formUtils.LANG + * @param {Object} conf Optional, will override the default settings + * @return {jQuery} + */ + $.fn.validateOnBlur = function (language, conf) { + var $form = this, + $elems = this.find('*[data-validation]'); + + $elems.each(function(){ + var $this = $(this); + if ($this.is('[type=radio]')){ + var $additionals = $form.find('[type=radio][name="' + $this.attr('name') + '"]'); + $additionals.bind('blur.validation', function(){ + $this.validateInputOnBlur(language, conf, true, 'blur'); + }); + if (conf.validateCheckboxRadioOnClick) { + $additionals.bind('click.validation', function () { + $this.validateInputOnBlur(language, conf, true, 'click'); + }); + } + } + }); + + $elems.bind('blur.validation', function () { + $(this).validateInputOnBlur(language, conf, true, 'blur'); + }); + + if (conf.validateCheckboxRadioOnClick) { + // bind click event to validate on click for radio & checkboxes for nice UX + this.find('input[type=checkbox][data-validation],input[type=radio][data-validation]') + .bind('click.validation', function () { + $(this).validateInputOnBlur(language, conf, true, 'click'); + }); + } + + return this; + }; + + /* + * Assigns validateInputOnBlur function to elements custom event + * @param {Object} language Optional, will override $.formUtils.LANG + * @param {Object} settings Optional, will override the default settings + * * @return {jQuery} + */ + $.fn.validateOnEvent = function (language, config) { + if(this.length === 0) { + return; + } + + var $elements = this[0].nodeName === 'FORM' ? this.find('*[data-validation-event]') : this; + $elements + .each(function () { + var $el = $(this), + etype = $el.valAttr('event'); + if (etype) { + $el + .unbind(etype + '.validation') + .bind(etype + '.validation', function (evt) { + if( (evt || {}).keyCode !== 9 ) { + $(this).validateInputOnBlur(language, config, true, etype); + } + }); + } + }); + return this; + }; + + /** + * fade in help message when input gains focus + * fade out when input loses focus + * + * + * @param {String} attrName - Optional, default is data-help + * @return {jQuery} + */ + $.fn.showHelpOnFocus = function (attrName) { + if (!attrName) { + attrName = 'data-validation-help'; + } + + // Add help text listeners + this.find('textarea,input').each(function () { + var $elem = $(this), + className = 'jquery_form_help_' + (++_helpers), + help = $elem.attr(attrName); + + // Reset + $elem + .removeClass('has-help-text') + .unbind('focus.help') + .unbind('blur.help'); + + if (help) { + $elem + .addClass('has-help-txt') + .bind('focus.help', function () { + var $help = $elem.parent().find('.' + className); + if ($help.length === 0) { + $help = $('') + .addClass(className) + .addClass('help') + .addClass('help-block') // twitter bs + .text(help) + .hide(); + + $elem.after($help); + } + $help.fadeIn(); + }) + .bind('blur.help', function () { + $(this) + .parent() + .find('.' + className) + .fadeOut('slow'); + }); + } + }); + + return this; + }; + + /** + * @param {Function} cb + * @param {Object} [conf] + * @param {Object} [lang] + */ + $.fn.validate = function(cb, conf, lang) { + var language = $.extend({}, $.formUtils.LANG, lang || {}); + this.each(function() { + var $elem = $(this), + closestFormElem = $elem.closest('form').get(0) || {}, + formDefaultConfig = closestFormElem.validationConfig || $.formUtils.defaultConfig(); + + $elem.one('validation', function(evt, isValid) { + if ( typeof cb === 'function' ) { + cb(isValid, this, evt); + } + }); + + $elem.validateInputOnBlur( + language, + $.extend({}, formDefaultConfig, conf || {}), + true + ); + }); + }; + + /** + * Tells whether or not validation of this input will have to postpone the form submit () + * @returns {Boolean} + */ + $.fn.willPostponeValidation = function() { + return (this.valAttr('suggestion-nr') || + this.valAttr('postpone') || + this.hasClass('hasDatepicker')) && + !window.postponedValidation; + }; + + /** + * Validate single input when it loses focus + * shows error message in a span element + * that is appended to the parent element + * + * @param {Object} [language] Optional, will override $.formUtils.LANG + * @param {Object} [conf] Optional, will override the default settings + * @param {Boolean} attachKeyupEvent Optional + * @param {String} eventContext + * @return {jQuery} + */ + $.fn.validateInputOnBlur = function (language, conf, attachKeyupEvent, eventContext) { + + $.formUtils.eventType = eventContext; + + if ( this.willPostponeValidation() ) { + // This validation has to be postponed + var _self = this, + postponeTime = this.valAttr('postpone') || 200; + + window.postponedValidation = function () { + _self.validateInputOnBlur(language, conf, attachKeyupEvent, eventContext); + window.postponedValidation = false; + }; + + setTimeout(function () { + if (window.postponedValidation) { + window.postponedValidation(); + } + }, postponeTime); + + return this; + } + + language = $.extend({}, $.formUtils.LANG, language || {}); + $.formUtils.dialogs.removeInputStylingAndMessage(this, conf); + + var $elem = this, + $form = $elem.closest('form'), + result = $.formUtils.validateInput( + $elem, + language, + conf, + $form, + eventContext + ); + + var reValidate = function() { + $elem.validateInputOnBlur(language, conf, false, 'blur.revalidated'); + }; + + if (eventContext === 'blur') { + $elem + .unbind('validation.revalidate', reValidate) + .one('validation.revalidate', reValidate); + } + + if (attachKeyupEvent) { + $elem.removeKeyUpValidation(); + } + + if (result.shouldChangeDisplay) { + if (result.isValid) { + $.formUtils.dialogs.applyInputSuccessStyling($elem, conf); + } else { + $.formUtils.dialogs.setInlineMessage($elem, result.errorMsg, conf); + } + } + + if (!result.isValid && attachKeyupEvent) { + $elem.validateOnKeyUp(language, conf); + } + + return this; + }; + + /** + * Validate element on keyup-event + */ + $.fn.validateOnKeyUp = function(language, conf) { + this.each(function() { + var $input = $(this); + if (!$input.valAttr('has-keyup-event')) { + $input + .valAttr('has-keyup-event', 'true') + .bind('keyup.validation', function (evt) { + if( evt.keyCode !== 9 ) { + $input.validateInputOnBlur(language, conf, false, 'keyup'); + } + }); + } + }); + return this; + }; + + /** + * Remove validation on keyup + */ + $.fn.removeKeyUpValidation = function() { + this.each(function() { + $(this) + .valAttr('has-keyup-event', false) + .unbind('keyup.validation'); + }); + return this; + }; + + /** + * Short hand for fetching/adding/removing element attributes + * prefixed with 'data-validation-' + * + * @param {String} name + * @param {String|Boolean} [val] + * @return {String|undefined|jQuery} + * @protected + */ + $.fn.valAttr = function (name, val) { + if (val === undefined) { + return this.attr('data-validation-' + name); + } else if (val === false || val === null) { + return this.removeAttr('data-validation-' + name); + } else { + name = ((name.length > 0) ? '-' + name : ''); + return this.attr('data-validation' + name, val); + } + }; + + /** + * Function that validates all inputs in active form + * + * @param {Object} [language] + * @param {Object} [conf] + * @param {Boolean} [displayError] Defaults to true + */ + $.fn.isValid = function (language, conf, displayError) { + + if ($.formUtils.isLoadingModules) { + var $self = this; + setTimeout(function () { + $self.isValid(language, conf, displayError); + }, 200); + return null; + } + + conf = $.extend({}, $.formUtils.defaultConfig(), conf || {}); + language = $.extend({}, $.formUtils.LANG, language || {}); + displayError = displayError !== false; + + if ($.formUtils.errorDisplayPreventedWhenHalted) { + // isValid() was called programmatically with argument displayError set + // to false when the validation was halted by any of the validators + delete $.formUtils.errorDisplayPreventedWhenHalted; + displayError = false; + } + + /** + * Adds message to error message stack if not already in the message stack + * + * @param {String} mess + * @para {jQuery} $elem + */ + var addErrorMessage = function (mess, $elem) { + if ($.inArray(mess, errorMessages) < 0) { + errorMessages.push(mess); + } + errorInputs.push($elem); + $elem.valAttr('current-error', mess); + if (displayError) { + $.formUtils.dialogs.applyInputErrorStyling($elem, conf); + } + }, + + /** Holds inputs (of type checkox or radio) already validated, to prevent recheck of mulitple checkboxes & radios */ + checkedInputs = [], + + /** Error messages for this validation */ + errorMessages = [], + + /** Input elements which value was not valid */ + errorInputs = [], + + /** Form instance */ + $form = this, + + /** + * Tells whether or not to validate element with this name and of this type + * + * @param {String} name + * @param {String} type + * @return {Boolean} + */ + ignoreInput = function (name, type) { + if (type === 'submit' || type === 'button' || type === 'reset') { + return true; + } + return $.inArray(name, conf.ignore || []) > -1; + }; + + // Reset style and remove error class + if (displayError) { + $.formUtils.dialogs.removeAllMessagesAndStyling($form, conf); + } + + // Validate element values + $form.find('input,textarea,select').filter(':not([type="submit"],[type="button"])').each(function () { + var $elem = $(this), + elementType = $elem.attr('type'), + isCheckboxOrRadioBtn = elementType === 'radio' || elementType === 'checkbox', + elementName = $elem.attr('name'); + + if (!ignoreInput(elementName, elementType) && (!isCheckboxOrRadioBtn || $.inArray(elementName, checkedInputs) < 0)) { + + if (isCheckboxOrRadioBtn) { + checkedInputs.push(elementName); + } + + var result = $.formUtils.validateInput( + $elem, + language, + conf, + $form, + 'submit' + ); + + if (!result.isValid) { + addErrorMessage(result.errorMsg, $elem); + } else if (result.isValid && result.shouldChangeDisplay) { + $elem.valAttr('current-error', false); + $.formUtils.dialogs.applyInputSuccessStyling($elem, conf); + } + } + + }); + + // Run validation callback + if (typeof conf.onValidate === 'function') { + var errors = conf.onValidate($form); + if ($.isArray(errors)) { + $.each(errors, function (i, err) { + addErrorMessage(err.message, err.element); + }); + } + else if (errors && errors.element && errors.message) { + addErrorMessage(errors.message, errors.element); + } + } + + // Reset form validation flag + $.formUtils.isValidatingEntireForm = false; + + // Validation failed + if (errorInputs.length > 0) { + if (displayError) { + if (conf.errorMessagePosition === 'top') { + $.formUtils.dialogs.setMessageInTopOfForm($form, errorMessages, conf, language); + } else { + $.each(errorInputs, function (i, $input) { + $.formUtils.dialogs.setInlineMessage($input, $input.valAttr('current-error'), conf); + }); + } + if (conf.scrollToTopOnError) { + $.formUtils.$win.scrollTop($form.offset().top - 20); + } + } + } + + if (!displayError && $.formUtils.haltValidation) { + $.formUtils.errorDisplayPreventedWhenHalted = true; + } + + return errorInputs.length === 0 && !$.formUtils.haltValidation; + }; + + /** + * Plugin for displaying input length restriction + */ + $.fn.restrictLength = function (maxLengthElement) { + new $.formUtils.lengthRestriction(this, maxLengthElement); + return this; + }; + + /** + * Add suggestion dropdown to inputs having data-suggestions with a comma + * separated string with suggestions + * @param {Array} [settings] + * @returns {jQuery} + */ + $.fn.addSuggestions = function (settings) { + var sugs = false; + this.find('input').each(function () { + var $field = $(this); + + sugs = $.split($field.attr('data-suggestions')); + + if (sugs.length > 0 && !$field.hasClass('has-suggestions')) { + $.formUtils.suggest($field, sugs, settings); + $field.addClass('has-suggestions'); + } + }); + return this; + }; + + +})(jQuery, window); diff --git a/src/main/module-loader.js b/src/main/module-loader.js new file mode 100644 index 0000000..490555c --- /dev/null +++ b/src/main/module-loader.js @@ -0,0 +1,154 @@ +/** + * Utility methods used for handling loading of modules (attached to $.formUtils) + */ +(function($) { + + 'use strict'; + + $.formUtils = $.extend($.formUtils || {}, { + + /** + * @var {Boolean} + */ + isLoadingModules: false, + + /** + * @var {Object} + */ + loadedModules: {}, + + /** + * @param {String} name + */ + registerLoadedModule: function (name) { + this.loadedModules[$.trim(name).toLowerCase()] = true; + }, + + /** + * @param {String} name + * @return {Boolean} + */ + hasLoadedModule: function (name) { + return $.trim(name).toLowerCase() in this.loadedModules; + }, + + /** + * @example + * $.formUtils.loadModules('date, security.dev'); + * + * Will load the scripts date.js and security.dev.js from the + * directory where this script resides. If you want to load + * the modules from another directory you can use the + * path argument. + * + * The script will be cached by the browser unless the module + * name ends with .dev + * + * @param {String} modules - Comma separated string with module file names (no directory nor file extension) + * @param {String} [path] - Path where the module files are located if their not in the same directory as the core modules + * @param {function} [callback] - Callback invoked when all modules are loaded + */ + loadModules: function (modules, path, callback) { + + if ($.formUtils.isLoadingModules) { + setTimeout(function () { + $.formUtils.loadModules(modules, path, callback); + }, 100); + return; + } + + var loadModuleScripts = function (modules, path) { + + var moduleList = $.split(modules), + numModules = moduleList.length, + moduleLoadedCallback = function () { + numModules--; + if (numModules === 0) { + $.formUtils.isLoadingModules = false; + if (typeof callback === 'function') { + callback(); + } + } + }; + + if (numModules > 0) { + $.formUtils.isLoadingModules = true; + } + + var cacheSuffix = '?_=' + ( new Date().getTime() ), + appendToElement = document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]; + + $.each(moduleList, function (i, modName) { + modName = $.trim(modName); + if (modName.length === 0 || $.formUtils.hasLoadedModule(modName)) { + moduleLoadedCallback(); + } else { + var scriptUrl = path + modName + (modName.slice(-3) === '.js' ? '' : '.js'), + script = document.createElement('SCRIPT'); + + if (typeof define === 'function' && define.amd) { + require([scriptUrl + ( scriptUrl.slice(-7) === '.dev.js' ? cacheSuffix : '' )], moduleLoadedCallback); + } else { + // Load the script + script.type = 'text/javascript'; + script.onload = moduleLoadedCallback; + script.src = scriptUrl + ( scriptUrl.slice(-7) === '.dev.js' ? cacheSuffix : '' ); + script.onerror = function() { + $.formUtils.warn('Unable to load form validation module '+scriptUrl, true); + moduleLoadedCallback(); + }; + script.onreadystatechange = function () { + // IE 7 fix + if (this.readyState === 'complete' || this.readyState === 'loaded') { + moduleLoadedCallback(); + // Handle memory leak in IE + this.onload = null; + this.onreadystatechange = null; + } + }; + appendToElement.appendChild(script); + } + } + }); + }; + + if (path) { + loadModuleScripts(modules, path); + } else { + var findScriptPathAndLoadModules = function () { + var foundPath = false; + $('script[src*="form-validator"]').each(function () { + var isScriptFromPluginNodeModulesDirectory = this.src.split('form-validator')[1].split('node_modules').length > 1; + if (!isScriptFromPluginNodeModulesDirectory) { + foundPath = this.src.substr(0, this.src.lastIndexOf('/')) + '/'; + if (foundPath === '/') { + foundPath = ''; + } + return false; + } + }); + + if (foundPath !== false) { + loadModuleScripts(modules, foundPath); + return true; + } + return false; + }; + + if (!findScriptPathAndLoadModules()) { + $(function () { + var hasLoadedModuleScripts = findScriptPathAndLoadModules(); + if (!hasLoadedModuleScripts) { + // The modules may have been inserted via a minified script + if (typeof callback === 'function') { + callback(); + } + } + }); + } + } + } + + }); + +})(jQuery); diff --git a/src/main/setup.js b/src/main/setup.js new file mode 100644 index 0000000..f799226 --- /dev/null +++ b/src/main/setup.js @@ -0,0 +1,175 @@ +/** + * Setup function for the plugin + */ +(function ($) { + + 'use strict'; + + + /** + * A bit smarter split function + * delimiter can be space, comma, dash or pipe + * @param {String} val + * @param {Function|String} [callback] + * @param {Boolean} [allowSpaceAsDelimiter] + * @returns {Array|void} + */ + $.split = function (val, callback, allowSpaceAsDelimiter) { + // default to true + allowSpaceAsDelimiter = allowSpaceAsDelimiter === undefined || allowSpaceAsDelimiter === true; + var pattern = '[,|'+(allowSpaceAsDelimiter ? '\\s':'')+'-]\\s*', + regex = new RegExp(pattern, 'g'); + if (typeof callback !== 'function') { + // return array + if (!val) { + return []; + } + var values = []; + $.each(val.split(callback ? callback : regex), + function (i, str) { + str = $.trim(str); + if (str.length) { + values.push(str); + } + } + ); + return values; + } else if (val) { + // exec callback func on each + $.each(val.split(regex), + function (i, str) { + str = $.trim(str); + if (str.length) { + return callback(str, i); + } + } + ); + } + }; + + /** + * Short hand function that makes the validation setup require less code + * @param conf + */ + $.validate = function (conf) { + + var defaultConf = $.extend($.formUtils.defaultConfig(), { + form: 'form', + validateOnEvent: false, + validateOnBlur: true, + validateCheckboxRadioOnClick: true, + showHelpOnFocus: true, + addSuggestions: true, + modules: '', + onModulesLoaded: null, + language: false, + onSuccess: false, + onError: false, + onElementValidate: false + }); + + conf = $.extend(defaultConf, conf || {}); + + $(window).trigger('formValidationPluginInit', [conf]); + + if( conf.lang && conf.lang !== 'en' ) { + var langModule = 'lang/'+conf.lang+'.js'; + conf.modules += conf.modules.length ? ','+langModule : langModule; + } + + // Add validation to forms + $(conf.form).each(function (i, form) { + + // Make a reference to the config for this form + form.validationConfig = conf; + + // Trigger jQuery event that we're about to setup validation + var $form = $(form); + $form.trigger('formValidationSetup', [$form, conf]); + + // Remove classes and event handlers that might have been + // added by a previous call to $.validate + $form.find('.has-help-txt') + .unbind('focus.validation') + .unbind('blur.validation'); + + $form + .removeClass('has-validation-callback') + .unbind('submit.validation') + .unbind('reset.validation') + .find('input[data-validation],textarea[data-validation]') + .unbind('blur.validation'); + + // Validate when submitted + $form.bind('submit.validation', function (evt) { + + var $form = $(this), + stop = function() { + evt.stopImmediatePropagation(); + return false; + }; + + if ($.formUtils.haltValidation) { + // pressing several times on submit button while validation is halted + return stop(); + } + + if ($.formUtils.isLoadingModules) { + setTimeout(function () { + $form.trigger('submit.validation'); + }, 200); + return stop(); + } + + var valid = $form.isValid(conf.language, conf); + if ($.formUtils.haltValidation) { + // Validation got halted by one of the validators + return stop(); + } else { + if (valid && typeof conf.onSuccess === 'function') { + var callbackResponse = conf.onSuccess($form); + if (callbackResponse === false) { + return stop(); + } + } else if (!valid && typeof conf.onError === 'function') { + conf.onError($form); + return stop(); + } else { + return valid ? true : stop(); + } + } + }) + .bind('reset.validation', function () { + $.formUtils.dialogs.removeAllMessagesAndStyling($form, conf); + }) + .addClass('has-validation-callback'); + + if (conf.showHelpOnFocus) { + $form.showHelpOnFocus(); + } + if (conf.addSuggestions) { + $form.addSuggestions(); + } + if (conf.validateOnBlur) { + $form.validateOnBlur(conf.language, conf); + $form.bind('html5ValidationAttrsFound', function () { + $form.validateOnBlur(conf.language, conf); + }); + } + if (conf.validateOnEvent) { + $form.validateOnEvent(conf.language, conf); + } + }); + + if (conf.modules !== '') { + $.formUtils.loadModules(conf.modules, null, function() { + if (typeof conf.onModulesLoaded === 'function') { + conf.onModulesLoaded(); + } + var $form = typeof conf.form === 'string' ? $(conf.form) : conf.form; + $.formUtils.$win.trigger('validatorsLoaded', [$form, conf]); + }); + } + }; + +})(jQuery); diff --git a/src/main/utils.js b/src/main/utils.js new file mode 100644 index 0000000..0caf1ca --- /dev/null +++ b/src/main/utils.js @@ -0,0 +1,713 @@ +/** + * Utility methods and properties attached to $.formUtils + */ +(function($, window) { + + 'use strict'; + + var $win = $(window); + + $.formUtils = $.extend($.formUtils || {}, { + + $win: $win, + + /** + * Default config for $(...).isValid(); + */ + defaultConfig: function () { + return { + ignore: [], // Names of inputs not to be validated even though `validationRuleAttribute` containing the validation rules tells us to + errorElementClass: 'error', // Class that will be put on elements which value is invalid + successElementClass: 'valid', // Class that will be put on elements that has been validated with success + borderColorOnError: '#b94a48', // Border color of elements which value is invalid, empty string to not change border color + errorMessageClass: 'form-error', // class name of div containing error messages when validation fails + validationRuleAttribute: 'data-validation', // name of the attribute holding the validation rules + validationErrorMsgAttribute: 'data-validation-error-msg', // define custom err msg inline with element + errorMessagePosition: 'inline', // Can be either "top" or "inline" + errorMessageTemplate: { + container: '
    {messages}
    ', + messages: '{errorTitle}
      {fields}
    ', + field: '
  • {msg}
  • ' + }, + scrollToTopOnError: true, + dateFormat: 'yyyy-mm-dd', + addValidClassOnAll: false, // whether or not to apply class="valid" even if the input wasn't validated + decimalSeparator: '.', + inputParentClassOnError: 'has-error', // twitter-bootstrap default class name + inputParentClassOnSuccess: 'has-success', // twitter-bootstrap default class name + validateHiddenInputs: false, // whether or not hidden inputs should be validated + inlineErrorMessageCallback: false, + submitErrorMessageCallback: false + }; + }, + + /** + * Available validators + */ + validators: {}, + + /** + * Available sanitizers + */ + sanitizers: {}, + + /** + * Events triggered by form validator + */ + _events: {load: [], valid: [], invalid: []}, + + /** + * Setting this property to true during validation will + * stop further validation from taking place and form will + * not be sent + */ + haltValidation: false, + + /** + * Function for adding a validator + * @see $.formUtils.addAsyncValidator (async.js) + * @param {Object} validator + */ + addValidator: function (validator) { + // prefix with "validate_" for backward compatibility reasons + var name = validator.name.indexOf('validate_') === 0 ? validator.name : 'validate_' + validator.name; + if (validator.validateOnKeyUp === undefined) { + validator.validateOnKeyUp = true; + } + this.validators[name] = validator; + }, + + /** + * Function for adding a sanitizer + * @param {Object} sanitizer + */ + addSanitizer: function (sanitizer) { + this.sanitizers[sanitizer.name] = sanitizer; + }, + + /** + * Warn user via the console if available + */ + warn: function(msg, fallbackOnAlert) { + if( 'console' in window ) { + if( typeof window.console.warn === 'function' ) { + window.console.warn(msg); + } else if( typeof window.console.log === 'function' ) { + window.console.log(msg); + } + } else if (fallbackOnAlert) { + // This is for some old IE version... + alert(msg); + } + }, + + /** + * Same as input $.fn.val() but also supporting input of typ radio or checkbox + * @example + * + * $.formUtils.getValue('.myRadioButtons', $('#some-form')); + * $.formUtils.getValue($('#some-form').find('.check-boxes')); + * + * @param query + * @param $parent + * @returns {String|Boolean} + */ + getValue: function(query, $parent) { + var $inputs = $parent ? $parent.find(query) : query; + if ($inputs.length > 0 ) { + var type = $inputs.eq(0).attr('type'); + if (type === 'radio' || type === 'checkbox') { + return $inputs.filter(':checked').val() || ''; + } else { + return $inputs.val() || ''; + } + } + return false; + }, + + /** + * Validate the value of given element according to the validation rules + * found in the attribute data-validation. Will return an object representing + * a validation result, having the props shouldChangeDisplay, isValid and errorMsg + * @param {jQuery} $elem + * @param {Object} language ($.formUtils.LANG) + * @param {Object} conf + * @param {jQuery} $form + * @param {String} [eventContext] + * @return {Object} + */ + validateInput: function ($elem, language, conf, $form, eventContext) { + + conf = conf || $.formUtils.defaultConfig(); + language = language || $.formUtils.LANG; + + if (!$form.length) { + $form = $elem.parent(); + } + + var value = this.getValue($elem); + + $elem + .valAttr('skipped', false) + .one('beforeValidation', function() { + // Skip input because its hidden or disabled + // Doing this in a callback makes it possible for others to prevent the default + // behaviour by binding to the same event and call evt.stopImmediatePropagation() + if ($elem.attr('disabled') || (!$elem.is(':visible') && !conf.validateHiddenInputs)) { + $elem.valAttr('skipped', 1); + } + }) + .trigger('beforeValidation', [value, language, conf]); + + var inputIsOptional = $elem.valAttr('optional') === 'true', + skipBecauseItsEmpty = !value && inputIsOptional, + validationRules = $elem.attr(conf.validationRuleAttribute), + isValid = true, + errorMsg = '', + result = {isValid: true, shouldChangeDisplay:true, errorMsg:''}; + + // For input type="number", browsers attempt to parse the entered value into a number. + // If the input is not numeric, browsers handle the situation differently: + // Chrome 48 simply disallows non-numeric input; FF 44 clears out the input box on blur; + // Safari 5 parses the entered string to find a leading number. + // If the input fails browser validation, the browser sets the input value equal to an empty string. + // Therefore, we cannot distinguish (apart from hacks) between an empty input type="text" and one with a + // value that can't be parsed by the browser. + + if (!validationRules || skipBecauseItsEmpty || $elem.valAttr('skipped')) { + result.shouldChangeDisplay = conf.addValidClassOnAll; + return result; + } + + // Filter out specified characters + var ignore = $elem.valAttr('ignore'); + if (ignore) { + $.each(ignore.split(''), function(i, character) { + value = value.replace(new RegExp('\\'+character, 'g'), ''); + }); + } + + $.split(validationRules, function (rule) { + + if (rule.indexOf('validate_') !== 0) { + rule = 'validate_' + rule; + } + + var validator = $.formUtils.validators[rule]; + + if (validator) { + + // special change of element for checkbox_group rule + if (rule === 'validate_checkbox_group') { + // set element to first in group, so error msg attr doesn't need to be set on all elements in group + $elem = $form.find('[name="' + $elem.attr('name') + '"]:eq(0)'); + } + + if (eventContext !== 'keyup' || validator.validateOnKeyUp) { + // A validator can prevent itself from getting triggered on keyup + isValid = validator.validatorFunction(value, $elem, conf, language, $form, eventContext); + } + + if (!isValid) { + if (conf.validateOnBlur) { + $elem.validateOnKeyUp(language, conf); + } + errorMsg = $.formUtils.dialogs.resolveErrorMessage($elem, validator, rule, conf, language); + return false; // break iteration + } + + } else { + + // todo: Add some validator lookup function and tell immediately which module is missing + throw new Error('Using undefined validator "' + rule + + '". Maybe you have forgotten to load the module that "' + rule +'" belongs to?'); + + } + + }); + + + if (isValid === false) { + $elem.trigger('validation', false); + result.errorMsg = errorMsg; + result.isValid = false; + result.shouldChangeDisplay = true; + } else if (isValid === null) { + // A validatorFunction returning null means that it's not able to validate + // the input at this time. Most probably some async stuff need to gets finished + // first and then the validator will re-trigger the validation. + result.shouldChangeDisplay = false; + } else { + $elem.trigger('validation', true); + result.shouldChangeDisplay = true; + } + + // Run element validation callback + if (typeof conf.onElementValidate === 'function' && errorMsg !== null) { + conf.onElementValidate(result.isValid, $elem, $form, errorMsg); + } + + $elem.trigger('afterValidation', [result, eventContext]); + + return result; + }, + + /** + * Is it a correct date according to given dateFormat. Will return false if not, otherwise + * an array 0=>year 1=>month 2=>day + * + * @param {String} val + * @param {String} dateFormat + * @param {Boolean} [addMissingLeadingZeros] + * @return {Array}|{Boolean} + */ + parseDate: function (val, dateFormat, addMissingLeadingZeros) { + var divider = dateFormat.replace(/[a-zA-Z]/gi, '').substring(0, 1), + regexp = '^', + formatParts = dateFormat.split(divider || null), + matches, day, month, year; + + $.each(formatParts, function (i, part) { + regexp += (i > 0 ? '\\' + divider : '') + '(\\d{' + part.length + '})'; + }); + + regexp += '$'; + + if (addMissingLeadingZeros) { + var newValueParts = []; + $.each(val.split(divider), function(i, part) { + if(part.length === 1) { + part = '0'+part; + } + newValueParts.push(part); + }); + val = newValueParts.join(divider); + } + + matches = val.match(new RegExp(regexp)); + if (matches === null) { + return false; + } + + var findDateUnit = function (unit, formatParts, matches) { + for (var i = 0; i < formatParts.length; i++) { + if (formatParts[i].substring(0, 1) === unit) { + return $.formUtils.parseDateInt(matches[i + 1]); + } + } + return -1; + }; + + month = findDateUnit('m', formatParts, matches); + day = findDateUnit('d', formatParts, matches); + year = findDateUnit('y', formatParts, matches); + + if ((month === 2 && day > 28 && (year % 4 !== 0 || year % 100 === 0 && year % 400 !== 0)) || + (month === 2 && day > 29 && (year % 4 === 0 || year % 100 !== 0 && year % 400 === 0)) || + month > 12 || month === 0) { + return false; + } + if ((this.isShortMonth(month) && day > 30) || (!this.isShortMonth(month) && day > 31) || day === 0) { + return false; + } + + return [year, month, day]; + }, + + /** + * skum fix. är talet 05 eller lägre ger parseInt rätt int annars får man 0 när man kör parseInt? + * + * @param {String} val + * @return {Number} + */ + parseDateInt: function (val) { + if (val.indexOf('0') === 0) { + val = val.replace('0', ''); + } + return parseInt(val, 10); + }, + + /** + * Has month only 30 days? + * + * @param {Number} m + * @return {Boolean} + */ + isShortMonth: function (m) { + return (m % 2 === 0 && m < 7) || (m % 2 !== 0 && m > 7); + }, + + /** + * Restrict input length + * + * @param {jQuery} $inputElement Jquery Html object + * @param {jQuery} $maxLengthElement jQuery Html Object + * @return void + */ + lengthRestriction: function ($inputElement, $maxLengthElement) { + // read maxChars from counter display initial text value + var maxChars = parseInt($maxLengthElement.text(), 10), + charsLeft = 0, + + // internal function does the counting and sets display value + countCharacters = function () { + var numChars = $inputElement.val().length; + if (numChars > maxChars) { + // get current scroll bar position + var currScrollTopPos = $inputElement.scrollTop(); + // trim value to max length + $inputElement.val($inputElement.val().substring(0, maxChars)); + $inputElement.scrollTop(currScrollTopPos); + } + charsLeft = maxChars - numChars; + if (charsLeft < 0) { + charsLeft = 0; + } + + // set counter text + $maxLengthElement.text(charsLeft); + }; + + // bind events to this element + // setTimeout is needed, cut or paste fires before val is available + $($inputElement).bind('keydown keyup keypress focus blur', countCharacters) + .bind('cut paste', function () { + setTimeout(countCharacters, 100); + }); + + // count chars on pageload, if there are prefilled input-values + $(document).bind('ready', countCharacters); + }, + + /** + * Test numeric against allowed range + * + * @param $value int + * @param $rangeAllowed str; (1-2, min1, max2, 10) + * @return array + */ + numericRangeCheck: function (value, rangeAllowed) { + // split by dash + var range = $.split(rangeAllowed), + // min or max + minmax = parseInt(rangeAllowed.substr(3), 10); + + if( range.length === 1 && rangeAllowed.indexOf('min') === -1 && rangeAllowed.indexOf('max') === -1 ) { + range = [rangeAllowed, rangeAllowed]; // only a number, checking agains an exact number of characters + } + + // range ? + if (range.length === 2 && (value < parseInt(range[0], 10) || value > parseInt(range[1], 10) )) { + return [ 'out', range[0], range[1] ]; + } // value is out of range + else if (rangeAllowed.indexOf('min') === 0 && (value < minmax )) // min + { + return ['min', minmax]; + } // value is below min + else if (rangeAllowed.indexOf('max') === 0 && (value > minmax )) // max + { + return ['max', minmax]; + } // value is above max + // since no other returns executed, value is in allowed range + return [ 'ok' ]; + }, + + + _numSuggestionElements: 0, + _selectedSuggestion: null, + _previousTypedVal: null, + + /** + * Utility function that can be used to create plugins that gives + * suggestions when inputs is typed into + * @param {jQuery} $elem + * @param {Array} suggestions + * @param {Object} settings - Optional + * @return {jQuery} + */ + suggest: function ($elem, suggestions, settings) { + var conf = { + css: { + maxHeight: '150px', + background: '#FFF', + lineHeight: '150%', + textDecoration: 'underline', + overflowX: 'hidden', + overflowY: 'auto', + border: '#CCC solid 1px', + borderTop: 'none', + cursor: 'pointer' + }, + activeSuggestionCSS: { + background: '#E9E9E9' + } + }, + setSuggsetionPosition = function ($suggestionContainer, $input) { + var offset = $input.offset(); + $suggestionContainer.css({ + width: $input.outerWidth(), + left: offset.left + 'px', + top: (offset.top + $input.outerHeight()) + 'px' + }); + }; + + if (settings) { + $.extend(conf, settings); + } + + conf.css.position = 'absolute'; + conf.css['z-index'] = 9999; + $elem.attr('autocomplete', 'off'); + + if (this._numSuggestionElements === 0) { + // Re-position suggestion container if window size changes + $win.bind('resize', function () { + $('.jquery-form-suggestions').each(function () { + var $container = $(this), + suggestID = $container.attr('data-suggest-container'); + setSuggsetionPosition($container, $('.suggestions-' + suggestID).eq(0)); + }); + }); + } + + this._numSuggestionElements++; + + var onSelectSuggestion = function ($el) { + var suggestionId = $el.valAttr('suggestion-nr'); + $.formUtils._selectedSuggestion = null; + $.formUtils._previousTypedVal = null; + $('.jquery-form-suggestion-' + suggestionId).fadeOut('fast'); + }; + + $elem + .data('suggestions', suggestions) + .valAttr('suggestion-nr', this._numSuggestionElements) + .unbind('focus.suggest') + .bind('focus.suggest', function () { + $(this).trigger('keyup'); + $.formUtils._selectedSuggestion = null; + }) + .unbind('keyup.suggest') + .bind('keyup.suggest', function () { + var $input = $(this), + foundSuggestions = [], + val = $.trim($input.val()).toLocaleLowerCase(); + + if (val === $.formUtils._previousTypedVal) { + return; + } + else { + $.formUtils._previousTypedVal = val; + } + + var hasTypedSuggestion = false, + suggestionId = $input.valAttr('suggestion-nr'), + $suggestionContainer = $('.jquery-form-suggestion-' + suggestionId); + + $suggestionContainer.scrollTop(0); + + // Find the right suggestions + if (val !== '') { + var findPartial = val.length > 2; + $.each($input.data('suggestions'), function (i, suggestion) { + var lowerCaseVal = suggestion.toLocaleLowerCase(); + if (lowerCaseVal === val) { + foundSuggestions.push('' + suggestion + ''); + hasTypedSuggestion = true; + return false; + } else if (lowerCaseVal.indexOf(val) === 0 || (findPartial && lowerCaseVal.indexOf(val) > -1)) { + foundSuggestions.push(suggestion.replace(new RegExp(val, 'gi'), '$&')); + } + }); + } + + // Hide suggestion container + if (hasTypedSuggestion || (foundSuggestions.length === 0 && $suggestionContainer.length > 0)) { + $suggestionContainer.hide(); + } + + // Create suggestion container if not already exists + else if (foundSuggestions.length > 0 && $suggestionContainer.length === 0) { + $suggestionContainer = $('
    ').css(conf.css).appendTo('body'); + $elem.addClass('suggestions-' + suggestionId); + $suggestionContainer + .attr('data-suggest-container', suggestionId) + .addClass('jquery-form-suggestions') + .addClass('jquery-form-suggestion-' + suggestionId); + } + + // Show hidden container + else if (foundSuggestions.length > 0 && !$suggestionContainer.is(':visible')) { + $suggestionContainer.show(); + } + + // add suggestions + if (foundSuggestions.length > 0 && val.length !== foundSuggestions[0].length) { + + // put container in place every time, just in case + setSuggsetionPosition($suggestionContainer, $input); + + // Add suggestions HTML to container + $suggestionContainer.html(''); + $.each(foundSuggestions, function (i, text) { + $('
    ') + .append(text) + .css({ + overflow: 'hidden', + textOverflow: 'ellipsis', + whiteSpace: 'nowrap', + padding: '5px' + }) + .addClass('form-suggest-element') + .appendTo($suggestionContainer) + .click(function () { + $input.focus(); + $input.val($(this).text()); + $input.trigger('change'); + onSelectSuggestion($input); + }); + }); + } + }) + .unbind('keydown.validation') + .bind('keydown.validation', function (e) { + var code = (e.keyCode ? e.keyCode : e.which), + suggestionId, + $suggestionContainer, + $input = $(this); + + if (code === 13 && $.formUtils._selectedSuggestion !== null) { + suggestionId = $input.valAttr('suggestion-nr'); + $suggestionContainer = $('.jquery-form-suggestion-' + suggestionId); + if ($suggestionContainer.length > 0) { + var newText = $suggestionContainer.find('div').eq($.formUtils._selectedSuggestion).text(); + $input.val(newText); + $input.trigger('change'); + onSelectSuggestion($input); + e.preventDefault(); + } + } + else { + suggestionId = $input.valAttr('suggestion-nr'); + $suggestionContainer = $('.jquery-form-suggestion-' + suggestionId); + var $suggestions = $suggestionContainer.children(); + if ($suggestions.length > 0 && $.inArray(code, [38, 40]) > -1) { + if (code === 38) { // key up + if ($.formUtils._selectedSuggestion === null) { + $.formUtils._selectedSuggestion = $suggestions.length - 1; + } + else{ + $.formUtils._selectedSuggestion--; + } + if ($.formUtils._selectedSuggestion < 0) { + $.formUtils._selectedSuggestion = $suggestions.length - 1; + } + } + else if (code === 40) { // key down + if ($.formUtils._selectedSuggestion === null) { + $.formUtils._selectedSuggestion = 0; + } + else { + $.formUtils._selectedSuggestion++; + } + if ($.formUtils._selectedSuggestion > ($suggestions.length - 1)) { + $.formUtils._selectedSuggestion = 0; + } + } + + // Scroll in suggestion window + var containerInnerHeight = $suggestionContainer.innerHeight(), + containerScrollTop = $suggestionContainer.scrollTop(), + suggestionHeight = $suggestionContainer.children().eq(0).outerHeight(), + activeSuggestionPosY = suggestionHeight * ($.formUtils._selectedSuggestion); + + if (activeSuggestionPosY < containerScrollTop || activeSuggestionPosY > (containerScrollTop + containerInnerHeight)) { + $suggestionContainer.scrollTop(activeSuggestionPosY); + } + + $suggestions + .removeClass('active-suggestion') + .css('background', 'none') + .eq($.formUtils._selectedSuggestion) + .addClass('active-suggestion') + .css(conf.activeSuggestionCSS); + + e.preventDefault(); + return false; + } + } + }) + .unbind('blur.suggest') + .bind('blur.suggest', function () { + onSelectSuggestion($(this)); + }); + + return $elem; + }, + + /** + * Error dialogs + * + * @var {Object} + */ + LANG: { + errorTitle: 'Form submission failed!', + requiredField: 'This is a required field', + requiredFields: 'You have not answered all required fields', + badTime: 'You have not given a correct time', + badEmail: 'You have not given a correct e-mail address', + badTelephone: 'You have not given a correct phone number', + badSecurityAnswer: 'You have not given a correct answer to the security question', + badDate: 'You have not given a correct date', + lengthBadStart: 'The input value must be between ', + lengthBadEnd: ' characters', + lengthTooLongStart: 'The input value is longer than ', + lengthTooShortStart: 'The input value is shorter than ', + notConfirmed: 'Input values could not be confirmed', + badDomain: 'Incorrect domain value', + badUrl: 'The input value is not a correct URL', + badCustomVal: 'The input value is incorrect', + andSpaces: ' and spaces ', + badInt: 'The input value was not a correct number', + badSecurityNumber: 'Your social security number was incorrect', + badUKVatAnswer: 'Incorrect UK VAT Number', + badUKNin: 'Incorrect UK NIN', + badUKUtr: 'Incorrect UK UTR Number', + badStrength: 'The password isn\'t strong enough', + badNumberOfSelectedOptionsStart: 'You have to choose at least ', + badNumberOfSelectedOptionsEnd: ' answers', + badAlphaNumeric: 'The input value can only contain alphanumeric characters ', + badAlphaNumericExtra: ' and ', + wrongFileSize: 'The file you are trying to upload is too large (max %s)', + wrongFileType: 'Only files of type %s is allowed', + groupCheckedRangeStart: 'Please choose between ', + groupCheckedTooFewStart: 'Please choose at least ', + groupCheckedTooManyStart: 'Please choose a maximum of ', + groupCheckedEnd: ' item(s)', + badCreditCard: 'The credit card number is not correct', + badCVV: 'The CVV number was not correct', + wrongFileDim : 'Incorrect image dimensions,', + imageTooTall : 'the image can not be taller than', + imageTooWide : 'the image can not be wider than', + imageTooSmall : 'the image was too small', + min : 'min', + max : 'max', + imageRatioNotAccepted : 'Image ratio is not be accepted', + badBrazilTelephoneAnswer: 'The phone number entered is invalid', + badBrazilCEPAnswer: 'The CEP entered is invalid', + badBrazilCPFAnswer: 'The CPF entered is invalid', + badPlPesel: 'The PESEL entered is invalid', + badPlNip: 'The NIP entered is invalid', + badPlRegon: 'The REGON entered is invalid', + badreCaptcha: 'Please confirm that you are not a bot', + passwordComplexityStart: 'Password must contain at least ', + passwordComplexitySeparator: ', ', + passwordComplexityUppercaseInfo: ' uppercase letter(s)', + passwordComplexityLowercaseInfo: ' lowercase letter(s)', + passwordComplexitySpecialCharsInfo: ' special character(s)', + passwordComplexityNumericCharsInfo: ' numeric character(s)', + passwordComplexityEnd: '.' + } + }); + +})(jQuery, window); diff --git a/src/modules/brazil.js b/src/modules/brazil.js new file mode 100644 index 0000000..c2caa10 --- /dev/null +++ b/src/modules/brazil.js @@ -0,0 +1,119 @@ +/** + * jQuery Form Validator Module: Brazil + * ------------------------------------------ + * Created by Eduardo Cuducos + * + * This form validation module adds validators typically used on + * websites in the Brazil. This module adds the following validators: + * - cpf + * - cep + * - brphone + * + * @website http://formvalidator.net/#brazil-validators + * @license MIT + */ +(function($) { + + $.formUtils.registerLoadedModule('brazil'); + + $.formUtils.addValidator({ + name : 'cpf', + validatorFunction : function(string) { + + // Based on this post from DevMedia: + // http://www.devmedia.com.br/validar-cpf-com-javascript/23916 + + // clean up the input (digits only) and set some support vars + var cpf = string.replace(/\D/g,''); + var sum1 = 0; + var sum2 = 0; + var remainder1 = 0; + var remainder2 = 0; + + // skip special cases + if (cpf.length !== 11 || cpf === '00000000000') { + return false; + } + + // check 1st verification digit + for (i = 1; i<= 9; i++) { + sum1 += parseInt(cpf.substring(i - 1, i)) * (11 - i); + } + remainder1 = (sum1 * 10) % 11; + if (remainder1 >= 10) { + remainder1 = 0; + } + if (remainder1 !== parseInt(cpf.substring(9, 10))) { + return false; + } + + // check 2nd verification digit + for (i = 1; i <= 10; i++) { + sum2 += parseInt(cpf.substring(i - 1, i)) * (12 - i); + } + remainder2 = (sum2 * 10) % 11; + if (remainder2 >= 10) { + remainder2 = 0; + } + if (remainder2 !== parseInt(cpf.substring(10, 11))) { + return false; + } + + return true; + + }, + errorMessage : '', + errorMessageKey: 'badBrazilCPFAnswer' + + }); + + $.formUtils.addValidator({ + name : 'brphone', + validatorFunction : function(string) { + + // validates telefones such as (having X as numbers): + // (XX) XXXX-XXXX + // (XX) XXXXX-XXXX + // XX XXXXXXXX + // XX XXXXXXXXX + // XXXXXXXXXX + // XXXXXXXXXXX + // +XX XX XXXXX-XXXX + // +X XX XXXX-XXXX + // And so on… + + if (string.match(/^(\+[\d]{1,3}[\s]{0,1}){0,1}(\(){0,1}(\d){2}(\)){0,1}(\s){0,1}(\d){4,5}([-. ]){0,1}(\d){4}$/g)) { + return true; + } + + return false; + + }, + errorMessage : '', + errorMessageKey: 'badBrazilTelephoneAnswer' + + }); + + $.formUtils.addValidator({ + name : 'cep', + validatorFunction : function(string) { + + // validates CEP such as (having X as numbers): + // XXXXX-XXX + // XXXXX.XXX + // XXXXX XXX + // XXXXXXXX + + if (string.match(/^(\d){5}([-. ]){0,1}(\d){3}$/g)) { + return true; + } + + return false; + + }, + errorMessage : '', + errorMessageKey: 'badBrazilCEPAnswer' + + }); + +})(jQuery); diff --git a/src/modules/color.js b/src/modules/color.js new file mode 100644 index 0000000..938dbab --- /dev/null +++ b/src/modules/color.js @@ -0,0 +1,254 @@ +/** + * jQuery Form Validator Module: Color + * ------------------------------------------ + * Created by dszymczuk + * + * + * This form validation module adds validators for some color formats like: hex, rgb, rgba, hsl, hsla. + * Also it allow to use transparent as color + * This module adds the following validators: + * - color + * + * @license MIT + */ +(function($) { + + $.formUtils.registerLoadedModule('color'); + + /* + HELPER FUNCTIONS + */ + var filterFloat = function(value) { + if (/^(\-|\+)?([0-9]+(\.[0-9]+)?|Infinity)$/ + .test(value)) { + return Number(value); + } + + return NaN; + }; + + var isBetween0and1 = function(value) { + return value > 0 && value < 1; + }; + + // workaround for PhantomJS + // https://github.com/ariya/phantomjs/issues/14014 + // can't use Number.isInteger + var isInteger = function(value) { + return Math.floor(value) === value && $.isNumeric(value); + }; + + /** + * Check HEX format + */ + $.formUtils.addValidator({ + name: 'hex', + validatorFunction: function(val, $el) { + if ($el.valAttr('allow-transparent') === 'true' && val === 'transparent') { + return true; + } + + var startWithHex = val[0] === '#'; + if (!startWithHex) { + return false; + } + + var isCorrectLength = val.length === 4 || val.length === 7; + + if (isCorrectLength) { + var regex = /[0-9a-f]/i; + var valueSliced = val.slice(1).split(''); + var isValid = true; + valueSliced.forEach(function(i) { + if (i.match(regex) === null) { + isValid = false; + } + }); + return isValid; + } + + return false; + }, + errorMessage: '', + errorMessageKey: 'badHex' + }); + + /** + * Check RGB format + */ + $.formUtils.addValidator({ + name: 'rgb', + validatorFunction: function(val, $el) { + if ($el.valAttr('allow-transparent') === 'true' && val === 'transparent') { + return true; + } + + var removedSpace = val.replace(/ /g, ''); + var regex = /rgb\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3}\)/i; + + if (removedSpace.match(regex)) { + var removeRgbCall = removedSpace.replace(/rgb/g, ''); + var removeBrackets = removeRgbCall.replace(/\(/g, '').replace(/\)/g, ''); + var valueSliced = removeBrackets.split(','); + var isValid = true; + + valueSliced.forEach(function(i) { + var parsedInt = parseInt(i, 10); + if ((isInteger(parsedInt) && 0 <= parsedInt && parsedInt <= 255) === false) { + isValid = false; + } + }); + return isValid; + } + + return false; + }, + errorMessage: '', + errorMessageKey: 'badRgb' + }); + + /** + * Check RGBA format + */ + $.formUtils.addValidator({ + name: 'rgba', + validatorFunction: function(val, $el) { + if ($el.valAttr('allow-transparent') === 'true' && val === 'transparent') { + return true; + } + + var removedSpace = val.replace(/ /g, ''); + var regex = /rgba\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0,1]?.?[0-9]*\)/i; + + if (removedSpace.match(regex)) { + var removeRgbaCall = removedSpace.replace(/rgba/g, ''); + var removeBrackets = removeRgbaCall.replace(/\(/g, '').replace(/\)/g, ''); + var valueSliced = removeBrackets.split(','); + var isValid = true; + + valueSliced.forEach(function(i, index) { + var value = filterFloat(i); + if (isInteger(value)) { + var isInRange = value >= 0 && value <= 255; + if (!isInRange) { + isValid = false; + } + + if (isValid && index === 3) { + isValid = value >= 0 && value < 2; + } + } else if (!isBetween0and1(i)) { + isValid = false; + } + }); + return isValid; + } + + return false; + }, + errorMessage: '', + errorMessageKey: 'badRgba' + }); + + /** + * Check HSL format + */ + $.formUtils.addValidator({ + name: 'hsl', + validatorFunction: function(val, $el) { + if ($el.valAttr('allow-transparent') === 'true' && val === 'transparent') { + return true; + } + + var removedSpace = val.replace(/ /g, ''); + var regex = /hsl\(-?[0-9]{1,3},[0-9]{1,3}%,[0-9]{1,3}%\)/i; + + if (removedSpace.match(regex)) { + var removeHslCall = removedSpace.replace(/hsl/g, ''); + var removeBrackets = removeHslCall.replace(/\(/g, '').replace(/\)/g, ''); + var valueSliced = removeBrackets.split(','); + var isValid = true; + + valueSliced.forEach(function(i, index) { + var parsedInt = parseInt(i, 10); + + if (isInteger(parsedInt)) { + if (index !== 0) { + var isInRange = parsedInt >= 0 && parsedInt <= 100; + if (!isInRange) { + isValid = false; + } + } + } else { + isValid = false; + } + }); + return isValid; + } + + return false; + }, + errorMessage: '', + errorMessageKey: 'badHsl' + }); + + /** + * Check HSLA format + */ + $.formUtils.addValidator({ + name: 'hsla', + validatorFunction: function(val, $el) { + if ($el.valAttr('allow-transparent') === 'true' && val === 'transparent') { + return true; + } + + var isInRange; + var removedSpace = val.replace(/ /g, ''); + var regex = /hsla\(-?[0-9]{1,3},[0-9]{1,3}%,[0-9]{1,3}%,[0,1]?.?[0-9]*\)/i; + + if (removedSpace.match(regex)) { + var removeHslaCall = removedSpace.replace(/hsla/g, ''); + var removeBrackets = removeHslaCall.replace(/\(/g, '').replace(/\)/g, ''); + var valueSliced = removeBrackets.split(','); + var isValid = true; + + valueSliced.forEach(function(i, index) { + var value = filterFloat(i); + var parsedInt = parseInt(i, 10); + + if (isInteger(value)) { + if (index !== 0 && index !== 3) { + isInRange = value >= 0 && value <= 100; + if (!isInRange) { + isValid = false; + } + } + + if (isValid && index === 3) { + isValid = value >= 0 && value < 2; + } + } else if (isNaN(value) && isInteger(parsedInt)) { + isInRange = parsedInt >= 0 && parsedInt <= 100; + if (!isInRange) { + isValid = false; + } + } else { + value = filterFloat(Number(i).toFixed(20)); + + isInRange = value >= 0 && value <= 1; + if (!isInRange) { + isValid = false; + } + } + }); + + return isValid; + } + + return false; + }, + errorMessage: '', + errorMessageKey: 'badHsla' + }); + +})(jQuery); diff --git a/src/modules/date.js b/src/modules/date.js new file mode 100644 index 0000000..19b661f --- /dev/null +++ b/src/modules/date.js @@ -0,0 +1,102 @@ +/** + * jQuery Form Validator Module: Date + * ------------------------------------------ + * Created by Victor Jonsson + * Documentation and issue tracking on Github + * + * The following validators will be added by this module: + * - Time (HH:mmm) + * - Birth date + * + * @website http://formvalidator.net/#location-validators + * @license MIT + */ +(function ($) { + + $.formUtils.registerLoadedModule('date'); + + /* + * Validate time hh:mm + */ + $.formUtils.addValidator({ + name: 'time', + validatorFunction: function (time) { + if (time.match(/^(\d{2}):(\d{2})$/) === null) { + return false; + } else { + var hours = parseInt(time.split(':')[0], 10); + var minutes = parseInt(time.split(':')[1], 10); + if (hours > 23 || minutes > 59) { + return false; + } + } + return true; + }, + errorMessage: '', + errorMessageKey: 'badTime' + }); + + /* + * Is this a valid birth date + */ + $.formUtils.addValidator({ + name: 'birthdate', + validatorFunction: function (val, $el, conf) { + var dateFormat = 'yyyy-mm-dd'; + if ($el.valAttr('format')) { + dateFormat = $el.valAttr('format'); + } + else if (typeof conf.dateFormat !== 'undefined') { + dateFormat = conf.dateFormat; + } + + var inputDate = $.formUtils.parseDate(val, dateFormat); + if (!inputDate) { + return false; + } + + var year = inputDate[0], + month = inputDate[1], + day = inputDate[2], + age = getAge(year, month, day), + allowedAgeRange = ($el.valAttr('age-range') || '0-124').split('-'); + + $el.trigger('ageCalculated', [age]); + + if (allowedAgeRange.length !== 2 || !$.isNumeric(allowedAgeRange[0]) || !$.isNumeric(allowedAgeRange[1])) { + throw new Error('Date range format invalid'); + } + + return age >= allowedAgeRange[0] && age <= allowedAgeRange[1]; + }, + errorMessage: '', + errorMessageKey: 'badDate' + }); + + function getAge(otherDateYear, otherDateMonth, otherDateDay) { + var birthDate = new Date(otherDateYear, otherDateMonth, otherDateDay), now = new Date(), + years = now.getFullYear() - birthDate.getFullYear(); + birthDate.setFullYear(birthDate.getFullYear() + years); + if (birthDate > now) { + years--; + birthDate.setFullYear(birthDate.getFullYear() - 1); + } + var days = Math.floor((now.getTime() - birthDate.getTime()) / (3600 * 24 * 1000)), + yearsOld = years + days / (isLeapYear(now.getFullYear()) ? 366 : 365), + decimals = ((yearsOld + '').split('.')[1] || '').substr(0, 3); + + if (yearsOld >= 0) { + return Math.floor(yearsOld) + (decimals >= 915 ? 1:0); + } else { + decimals *= 10; + return Math.floor(yearsOld) + (decimals <= 840 ? 1:0); + } + } + + function isLeapYear(year) { + var d = new Date(year, 1, 28); + d.setDate(d.getDate() + 1); + return d.getMonth() === 1; + } + +})(jQuery); diff --git a/form-validator/file.dev.js b/src/modules/file.js similarity index 70% rename from form-validator/file.dev.js rename to src/modules/file.js index 4d91ada..47e03d6 100644 --- a/form-validator/file.dev.js +++ b/src/modules/file.js @@ -8,13 +8,16 @@ * - file size * - file extension * + * @todo, Use $.formUtils.asyncValidation in "dimension" validator + * * @website http://formvalidator.net/#file-validators * @license MIT - * @version 2.2.83 */ (function($, window) { - 'use strict'; + $.formUtils.registerLoadedModule('file'); + + 'use strict'; var SUPPORTS_FILE_READER = typeof window.FileReader !== 'undefined', @@ -22,7 +25,7 @@ * @return {Array} */ _getTypes = function($input) { - var allowedTypes = $.split( ($input.valAttr('allowing') || '').toLowerCase() ); + var allowedTypes = ($input.valAttr('allowing') || '').toLowerCase().split(/,\s*/); if ($.inArray('jpg', allowedTypes) > -1 && $.inArray('jpeg', allowedTypes) === -1) { allowedTypes.push('jpeg'); } @@ -44,15 +47,6 @@ obj.errorMessage = msg.replace('\%s', insert); }, - /** - * @param {String} msg - */ - _log = function(msg) { - if( window.console && window.console.log ) { - window.console.log(msg); - } - }, - /** * @param {String} imgPath * @param {Function} successCallback @@ -66,7 +60,6 @@ reader.readAsDataURL(imgPath); reader.onload = function(fileObj) { - image.onload = function() { $(window).trigger('imageValidation', [this]); successCallback(this); @@ -77,7 +70,6 @@ }; image.src = fileObj.target.result; - }; }; @@ -87,7 +79,6 @@ $.formUtils.addValidator({ name : 'mime', validatorFunction : function(str, $input, conf, language) { - if( SUPPORTS_FILE_READER ) { var valid = true, files = $input.get(0).files || [], @@ -97,7 +88,7 @@ if( files.length ) { $.each(files, function(i, file) { valid = false; - mime = file.type || ''; + mime = file.type || file.name.substring(file.name.lastIndexOf('.') + 1); $.each(allowedTypes, function(j, type) { valid = mime.indexOf(type) > -1; if( valid ) { @@ -107,8 +98,8 @@ return valid; }); - if( !valid ) { - _log('Trying to upload a file with mime type '+mime+' which is not allowed'); + if (!valid) { + $.formUtils.warn('Trying to upload a file with mime type '+mime+' which is not allowed'); _generateErrorMsg(this, 'wrongFileType', allowedTypes.join(', '), language); } } @@ -116,7 +107,7 @@ return valid; } else { - _log('FileReader not supported by browser, will check file extension'); + $.formUtils.warn('FileReader not supported by browser, will check file extension'); return $.formUtils.validators.validate_extension.validatorFunction(str, $input, conf, language); } }, @@ -159,7 +150,7 @@ validatorFunction : function(val, $input, conf, language) { var maxSize = $input.valAttr('max-size'); if( !maxSize ) { - _log('Input "'+$input.attr('name')+'" is missing data-validation-max-size attribute'); + $.formUtils.warn('Input "'+$input.attr('name')+'" is missing data-validation-max-size attribute', true); return true; } else if( !SUPPORTS_FILE_READER ) { return true; // no fallback available @@ -202,10 +193,6 @@ } }; - var disableFormSubmit = function() { - return false; - }; - /** * Attach dimension check onto formUtils only for unit testing purpose * @param {HTMLImageElement} img @@ -291,99 +278,48 @@ /** * Validate image dimension */ - $.formUtils.addValidator({ + $.formUtils.addAsyncValidator({ name : 'dimension', - validatorFunction : function(val, $input, conf, language, $form) { - var hasCorrectDim = false; - if( SUPPORTS_FILE_READER ) { - var file = $input.get(0).files || []; - hasCorrectDim = true; - - if( $input.attr('data-validation').indexOf('mime') === -1) { - alert('You should validate file type being jpg, gif or png on input '+$input[0].name); - return false; - } - else if( file.length > 1 ) { + validatorFunction : function(done, val, $input, conf, language) { + if (!SUPPORTS_FILE_READER) { + // Unable to do the validation, lacking FileReader support + done(true); + } else { + var file = $input.get(0).files || [], + thisValidator = this; + if ($input.attr('data-validation').indexOf('mime') === -1) { + alert('You should validate file type being jpg, gif or png on input ' + $input[0].name); + done(false); + } else if (file.length > 1) { alert('Validating image dimensions does not support inputs allowing multiple files'); - return false; - } else if( file.length === 0) { - return true; - } - - if( $input.valAttr('has-valid-dim') ) { - return true; - } - else if( $input.valAttr('has-not-valid-dim') ) { - this.errorMessage = language.wrongFileDim + ' ' + $input.valAttr('has-not-valid-dim'); - return false; - } - else if($.formUtils.eventType === 'keyup') { - return null; - } - - var wasFormSubmit = false; - - if( $.formUtils.isValidatingEntireForm ) { - wasFormSubmit = true; - $.formUtils.haltValidation = true; - $form - .bind('submit', disableFormSubmit) - .addClass('on-blur'); + done(false); + } else if (file.length === 0) { + done(true); + } else { + _loadImage(file[0], function (img) { + var error = false; + + if ($input.valAttr('dimension')) { + error = $.formUtils.checkImageDimension(img, $input.valAttr('dimension'), language); + } + + if (!error && $input.valAttr('ratio')) { + error = $.formUtils.checkImageRatio(img, $input.valAttr('ratio'), language); + } + + // Set validation result flag on input + if (error) { + thisValidator.errorMessage = language.wrongFileDim + ' ' + $input.valAttr('has-not-valid-dim'); + done(false); + } else { + done(true); + } + + }, function (err) { + throw err; + }); } - - _loadImage(file[0], function(img) { - var error = false; - - if ( $input.valAttr('dimension') ) { - error = $.formUtils.checkImageDimension(img, $input.valAttr('dimension'), language); - } - - if ( !error && $input.valAttr('ratio') ) { - error = $.formUtils.checkImageRatio(img, $input.valAttr('ratio'), language); - } - - // Set validation result flag on input - if( error ) { - $input.valAttr('has-not-valid-dim', error); - } - else { - $input.valAttr('has-valid-dim', 'true'); - } - - // Remove validation flag when input changed - if( !$input.valAttr('has-keyup-event') ) { - $input - .valAttr('has-keyup-event', '1') - .bind('keyup change', function(evt) { - if( evt.keyCode !== 9 && evt.keyCode !== 16 ) { - $(this) - .valAttr('has-not-valid-dim', false) - .valAttr('has-valid-dim', false); - } - }); - } - - if( wasFormSubmit ) { - $.formUtils.haltValidation = false; - $form - .removeClass('on-blur') - .get(0).onsubmit = function() {}; - - $form.unbind('submit', disableFormSubmit); - $form.trigger('submit'); // fire submit once more - - } else { - $input.trigger('blur'); // triggers the validation once more - } - - }, function(err) { - throw err; - }); - - return true; } - - return hasCorrectDim; }, errorMessage : '', errorMessageKey: '' // error message created dynamically @@ -394,20 +330,14 @@ * This event listener will remove error messages for file * inputs when file changes */ - $(window).one('validatorsLoaded formValidationSetup', function(evt, $form) { - var $inputs; - if( $form ) { - $inputs = $form.find('input[type="file"]'); - } else { - $inputs = $('input[type="file"]'); - } - - $inputs.filter('*[data-validation]').bind('change', function() { - $(this) - .removeClass('error') - .parent() - .find('.form-error').remove(); - }); + $(window).one('validatorsLoaded formValidationSetup', function(evt, $form, conf) { + var $inputs; + if( $form ) { + $inputs = $form.find('input[type="file"]'); + } else { + $inputs = $('input[type="file"]'); + } + $.formUtils.dialogs.removeInputStylingAndMessage($inputs, conf); }); })(jQuery, window); diff --git a/src/modules/html5.js b/src/modules/html5.js new file mode 100644 index 0000000..f8c66a4 --- /dev/null +++ b/src/modules/html5.js @@ -0,0 +1,175 @@ +/** + * jQuery Form Validator Module: html5 + * ------------------------------------------ + * Created by Victor Jonsson + * + * The following module will make this jQuery plugin serve as a + * html5 fallback. It makes older browsers support the following + * - validation when type="email" + * - validation when type="url" + * - validation when type="time" + * - validation when type="date" + * - validation when type="number" and max="" min="" + * - validation when pattern="REGEXP" + * - validation when using maxlength + * - Using datalist element for creating suggestions + * - placeholders + * + * @website http://formvalidator.net/ + * @license MIT + */ +(function ($) { + + 'use strict'; + + $.formUtils.registerLoadedModule('html5'); + + var SUPPORTS_PLACEHOLDER = 'placeholder' in document.createElement('INPUT'), + SUPPORTS_DATALIST = 'options' in document.createElement('DATALIST'), + hasLoadedDateModule = false, + setupValidationUsingHTML5Attr = function ($form) { + + $form.each(function () { + var $f = $(this), + $formInputs = $f.find('input,textarea,select'), + foundHtml5Rule = false; + + $formInputs.each(function () { + var validation = [], + $input = $(this), + isRequired = $input.attr('required'), + attrs = {}; + + if (isRequired) { + validation.push('required'); + } + + switch (($input.attr('type') || '').toLowerCase()) { + case 'time': + validation.push('time'); + if (!$.formUtils.validators.validate_date && !hasLoadedDateModule) { + hasLoadedDateModule = true; + $.formUtils.loadModules('date'); + } + break; + case 'url': + validation.push('url'); + break; + case 'email': + validation.push('email'); + break; + case 'date': + validation.push('date'); + break; + case 'number': + validation.push('number'); + var max = $input.attr('max'), + min = $input.attr('min'), + step = $input.attr('step'); + if (min || max) { + if (!min) { + min = '0'; + } + if (!max) { + max = '9007199254740992'; // js max int + } + if (!step) { + step = '1'; // default value + } + + attrs['data-validation-allowing'] = 'range[' + min + ';' + max + ']'; + if (min.indexOf('-') === 0 || max.indexOf('-') === 0) { + attrs['data-validation-allowing'] += ',negative'; + } + if (min.indexOf('.') > -1 || max.indexOf('.') > -1 || step.indexOf('.') > -1) { + attrs['data-validation-allowing'] += ',float'; + } + } else { + attrs['data-validation-allowing'] += ',float,negative'; + } + break; + } + + if ($input.attr('pattern')) { + validation.push('custom'); + attrs['data-validation-regexp'] = $input.attr('pattern'); + } + if ($input.attr('maxlength')) { + validation.push('length'); + attrs['data-validation-length'] = 'max' + $input.attr('maxlength'); + } + + if (!SUPPORTS_DATALIST && $input.attr('list')) { + var suggestions = [], + $list = $('#' + $input.attr('list')); + + $list.find('option').each(function () { + suggestions.push($(this).text()); + }); + + if (suggestions.length === 0) { + // IE fix + var opts = $.trim($('#' + $input.attr('list')).text()).split('\n'); + $.each(opts, function (i, option) { + suggestions.push($.trim(option)); + }); + } + + $list.remove(); + + $.formUtils.suggest($input, suggestions); + } + + if (validation.length) { + if (!isRequired) { + attrs['data-validation-optional'] = 'true'; + } + + foundHtml5Rule = true; + + var validationRules = ($input.attr('data-validation') || '') + ' ' + validation.join(' '); + $input.attr('data-validation', $.trim(validationRules)); + + $.each(attrs, function (attrName, attrVal) { + $input.attr(attrName, attrVal); + }); + } + }); + + if (foundHtml5Rule) { + $f.trigger('html5ValidationAttrsFound'); + } + + if (!SUPPORTS_PLACEHOLDER) { + $formInputs.filter('input[placeholder]').each(function () { + this.__defaultValue = this.getAttribute('placeholder'); + $(this) + .bind('focus', function () { + if (this.value === this.__defaultValue) { + this.value = ''; + $(this).removeClass('showing-placeholder'); + } + }) + .bind('blur', function () { + if ($.trim(this.value) === '') { + this.value = this.__defaultValue; + $(this).addClass('showing-placeholder'); + } + }); + }); + } + + }); + }; + + $.formUtils.$win.bind('validatorsLoaded formValidationSetup', function (evt, $form) { + if (!$form) { + $form = $('form'); + } + setupValidationUsingHTML5Attr($form); + }); + + // Make this method available outside the module + $.formUtils.setupValidationUsingHTML5Attr = setupValidationUsingHTML5Attr; + +})(jQuery, window); diff --git a/form-validator/jsconf.dev.js b/src/modules/jsconf.js similarity index 72% rename from form-validator/jsconf.dev.js rename to src/modules/jsconf.js index df51995..cbc4ac7 100644 --- a/form-validator/jsconf.dev.js +++ b/src/modules/jsconf.js @@ -7,12 +7,13 @@ * * @website http://formvalidator.net/#location-validators * @license MIT - * @version 2.2.83 */ (function($) { 'use strict'; + $.formUtils.registerLoadedModule('jsconf'); + $.setupValidation = function(conf) { var $forms = $(conf.form || 'form'); $.each(conf.validate || conf.validation || {}, function(elemRef, attr) { @@ -31,15 +32,25 @@ $.each(attr, function(name, val) { if( name !== 'validation' && val !== false) { - if( val === true ){ + if( val === true ) { val = 'true'; } - $elem.valAttr(name, val); + if( name[0] === '_' ) { + name = name.substring(1); + if( val === false ) { + $elem.removeAttr(name); + } else { + $elem.attr(name, val); + } + } else { + $elem.valAttr(name, val); + } } }); }); $.validate(conf); + }; })(jQuery); diff --git a/src/modules/location.js b/src/modules/location.js new file mode 100644 index 0000000..7f648c1 --- /dev/null +++ b/src/modules/location.js @@ -0,0 +1,82 @@ +/** + * jQuery Form Validator Module: Date + * ------------------------------------------ + * Created by Victor Jonsson + * + * The following validators will be added by this module: + * - Country + * - US state + * - longitude and latitude + * + * @website http://formvalidator.net/#location-validators + * @license MIT + */ +(function ($) { + + $.formUtils.registerLoadedModule('location'); + + /* + * Validate that country exists + */ + $.formUtils.addValidator({ + name: 'country', + validatorFunction: function (str) { + return $.inArray(str.toLowerCase(), this.countries) > -1; + }, + countries: ['afghanistan', 'albania', 'algeria', 'american samoa', 'andorra', 'angola', 'anguilla', 'antarctica', 'antigua and barbuda', 'argentina', 'armenia', 'aruba', 'australia', 'austria', 'azerbaijan', 'bahamas', 'bahrain', 'bangladesh', 'barbados', 'belarus', 'belgium', 'belize', 'benin', 'bermuda', 'bhutan', 'bolivia', 'bonaire', 'bosnia and herzegovina', 'botswana', 'bouvet island', 'brazil', 'british indian ocean territory', 'brunei darussalam', 'bulgaria', 'burkina faso', 'burundi', 'cabo verde', 'cambodia', 'cameroon', 'canada', 'cayman islands', 'central african republic', 'chad', 'chile', 'china', 'christmas island', 'cocos islands', 'colombia', 'comoros', 'democratic republic of the congo', 'congo', 'cook islands', 'costa rica', 'côte d\'ivoire', 'croatia', 'cuba', 'curaçao', 'cyprus', 'czechia', 'denmark', 'djibouti', 'dominica', 'dominican republic', 'ecuador', 'egypt', 'el salvador', 'equatorial guinea', 'eritrea', 'estonia', 'ethiopia', 'falkland islands', 'faroe islands', 'fiji', 'finland', 'france', 'french guiana', 'french polynesia', 'french southern territories', 'gabon', 'gambia', 'georgia', 'germany', 'ghana', 'gibraltar', 'greece', 'greenland', 'grenada', 'guadeloupe', 'guam', 'guatemala', 'guernsey', 'guinea', 'guinea-bissau', 'guyana', 'haiti', 'heard island and mcdonald islands', 'honduras', 'hong kong', 'hungary', 'iceland', 'india', 'indonesia', 'iran', 'iraq', 'ireland', 'isle of man', 'israel', 'italy', 'jamaica', 'japan', 'jersey', 'jordan', 'kazakhstan', 'kenya', 'kiribati', 'north korea', 'south korea', 'kuwait', 'kyrgyzstan', 'laos', 'latvia', 'lebanon', 'lesotho', 'liberia', 'libya', 'liechtenstein', 'lithuania', 'luxembourg', 'macao', 'macedonia', 'madagascar', 'malawi', 'malaysia', 'maldives', 'mali', 'malta', 'marshall islands', 'martinique', 'mauritania', 'mauritius', 'mayotte', 'mexico', 'micronesia', 'moldova', 'monaco', 'mongolia', 'montenegro', 'montserrat', 'morocco', 'mozambique', 'myanmar', 'namibia', 'nauru', 'nepal', 'netherlands', 'new caledonia', 'new zealand', 'nicaragua', 'niger', 'nigeria', 'niue', 'norfolk island', 'northern mariana islands', 'norway', 'oman', 'pakistan', 'palau', 'palestine', 'panama', 'papua new guinea', 'paraguay', 'peru', 'philippines', 'pitcairn', 'poland', 'portugal', 'puerto rico', 'qatar', 'réunion', 'romania', 'russia', 'rwanda', 'saint barthélemy', 'saint helena', 'ascension and tristan da cunha', 'Ascension and tristan da cunha', 'saint kitts and nevis', 'saint lucia', 'saint martin', 'saint pierre and miquelon', 'saint vincent and the grenadines', 'samoa', 'san marino', 'sao tome and principe', 'saudi arabia', 'senegal', 'serbia', 'seychelles', 'sierra leone', 'singapore', 'sint maarten', 'slovakia', 'slovenia', 'solomon islands', 'somalia', 'south africa', 'south georgia and the south sandwich islands', 'south sudan', 'spain', 'sri lanka', 'sudan', 'suriname', 'svalbard and jan mayen', 'swaziland', 'sweden', 'switzerland', 'syria', 'taiwan', 'tajikistan', 'tanzania', 'thailand', 'timor-leste', 'togo', 'tokelau', 'tonga', 'trinidad and tobago', 'tunisia', 'turkey', 'turkmenistan', 'turks and caicos islands', 'tuvalu', 'uganda', 'ukraine', 'united arab emirates', 'united kingdom', 'united states minor outlying islands', 'united states', 'uruguay', 'uzbekistan', 'vanuatu', 'venezuela', 'vatican city', 'vietnam', 'virgin islands (british)', 'virgin islands (us)', 'wallis and futuna', 'western sahara', 'yemen', 'zambia', 'zimbabwe', 'åland islands'], + errorMessage: '', + errorMessageKey: 'badCustomVal' + }); + + /* + * Is this a valid federate state in the US + */ + $.formUtils.addValidator({ + name: 'federatestate', + validatorFunction: function (str) { + return $.inArray(str.toLowerCase(), this.states) > -1; + }, + states: ['alabama', 'alaska', 'arizona', 'arkansas', 'california', 'colorado', 'connecticut', 'delaware', 'florida', 'georgia', 'hawaii', 'idaho', 'illinois', 'indiana', 'iowa', 'kansas', 'kentucky', 'louisiana', 'maine', 'maryland', 'district of columbia', 'massachusetts', 'michigan', 'minnesota', 'mississippi', 'missouri', 'montana', 'nebraska', 'nevada', 'new hampshire', 'new jersey', 'new mexico', 'new york', 'north carolina', 'north dakota', 'ohio', 'oklahoma', 'oregon', 'pennsylvania', 'rhode island', 'south carolina', 'south dakota', 'tennessee', 'texas', 'utah', 'vermont', 'virginia', 'washington', 'west virginia', 'wisconsin', 'wyoming'], + errorMessage: '', + errorMessageKey: 'badCustomVal' + }); + + + $.formUtils.addValidator({ + name: 'longlat', + validatorFunction: function (str) { + var regexp = /^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/; + return regexp.test(str); + }, + errorMessage: '', + errorMessageKey: 'badCustomVal' + }); + + /** + * @private + * @param {Array} listItems + * @return {Array} + */ + var _makeSortedList = function (listItems) { + var newList = []; + $.each(listItems, function (i, value) { + newList.push(value.substr(0, 1).toUpperCase() + value.substr(1, value.length)); + }); + newList.sort(); + return newList; + }; + + $.fn.suggestCountry = function (settings) { + var countries = _makeSortedList($.formUtils.validators.validate_country.countries), + usaIndex = $.inArray(countries, 'Usa'); + + countries[usaIndex] = 'USA'; + return $.formUtils.suggest(this, countries, settings); + }; + + $.fn.suggestState = function (settings) { + var states = _makeSortedList($.formUtils.validators.validate_federatestate.states); + return $.formUtils.suggest(this, states, settings); + }; + +})(jQuery); diff --git a/src/modules/logic.js b/src/modules/logic.js new file mode 100644 index 0000000..4f146f1 --- /dev/null +++ b/src/modules/logic.js @@ -0,0 +1,142 @@ +/** + * jQuery Form Validator Module: Logic + * ------------------------------------------ + * Created by Victor Jonsson + * + * - data-validation-depends-on + * - data-validation-if-answered + * + * @website http://formvalidator.net/#logic + * @license MIT + */ +(function($) { + + 'use strict'; + + $.formUtils.registerLoadedModule('logic'); + + var setupValidationDependsOn = function($form, conf) { + + var dependingOnBeforeValidation = function() { + + var $input = $(this), + nameOfDependingInput = $input.valAttr('depends-on') || $input.valAttr('if-checked'); + + // Whether or not this input should be validated depends on if another input has a value + if (nameOfDependingInput) { + + // Set the boolean telling us that the validation depends + // on another input being checked + var valueOfDependingInput = $.formUtils.getValue('[name="' + nameOfDependingInput + '"]', $form), + listWithRequiredValues = $.split($input.valAttr('depends-on-value'), false, false), + dependingInputIsMissingValueOrHasIncorrectValue = !valueOfDependingInput || ( + listWithRequiredValues.length && + !valueIsInList(valueOfDependingInput, listWithRequiredValues) + ); + + if (dependingInputIsMissingValueOrHasIncorrectValue) { + $input.valAttr('skipped', '1'); + } + } + }, + valueIsInList = function(value, valueList) { + var isInList = false, + lowerCaseValue = value.toLocaleLowerCase(); + + $.each(valueList, function(i, otherValue) { + if (lowerCaseValue === otherValue.toLocaleLowerCase()) { + isInList = true; + return false; + } + }); + return isInList; + }, + dependingOnValueChanged = function() { + var $input = $(this), + inputValue = $.formUtils.getValue($input), + requiredValueOfDependingInput = $input.valAttr('depending-value'); + $.each(this.dependingInputs, function (i, $otherInput) { + var otherInputHasValue = $.formUtils.getValue($otherInput) ? true:false, + dependingInputIsMissingValueOrHasIncorrectValue = !inputValue || ( + requiredValueOfDependingInput && + requiredValueOfDependingInput !== inputValue + ); + + if (dependingInputIsMissingValueOrHasIncorrectValue && !otherInputHasValue) { + $.formUtils.dialogs.removeInputStylingAndMessage($otherInput, conf); + } + }); + }; + + $form.find('[data-validation-depends-on]') + .off('beforeValidation', dependingOnBeforeValidation) + .on('beforeValidation', dependingOnBeforeValidation) + .each(function() { + // Remove validation when on depending input + var $dependingInput = $(this); + $form.find('[name="'+$dependingInput.valAttr('depends-on')+'"]').each(function() { + $(this) + .off('change', dependingOnValueChanged) + .on('change', dependingOnValueChanged) + .valAttr('depending-value', $dependingInput.valAttr('depends-on-value')); + + this.dependingInputs = this.dependingInputs || []; + this.dependingInputs.push($dependingInput); + }); + }); + + }, + setupValidationTogetherWith = function($form, conf) { + + var optionalBeforeValidation = function() { + var $input = $(this), + dependingInputs = $input.valAttr('optional-if-answered'), + dependingInputsHasValue = false, + thisInputHasAnswer = $.formUtils.getValue($input) ? true:false; + + if (!thisInputHasAnswer) { + $.each($.split(dependingInputs), function(i, inputName) { + var $dependingInput = $form.find('[name="'+inputName+'"]'); + dependingInputsHasValue = $.formUtils.getValue($dependingInput) ? true:false; + if (dependingInputsHasValue) { + return false; + } + }); + + if (dependingInputsHasValue) { + $input.valAttr('skipped', 1); + } + } + }, + optionalInputOnChange = function() { + var $input = $(this), + dependingInputs = $input.valAttr('optional-if-answered'); + + $.each($.split(dependingInputs), function(i, inputName) { + var $dependingInput = $form.find('[name="'+inputName+'"]'), + dependingInputsHasValue = $.formUtils.getValue($dependingInput) ? true:false; + if (!dependingInputsHasValue) { + $.formUtils.dialogs.removeInputStylingAndMessage($dependingInput, conf); + } + }); + }; + + $form.find('[data-validation-optional-if-answered]') + .off('beforeValidation', optionalBeforeValidation) + .on('beforeValidation', optionalBeforeValidation) + .each(function() { + $(this) + .off('change', optionalInputOnChange) + .on('change', optionalInputOnChange); + }); + }; + + $.formUtils.$win.bind('validatorsLoaded formValidationSetup', function(evt, $form, conf) { + if( !$form ) { + $form = $('form'); + } + setupValidationDependsOn($form, conf); + setupValidationTogetherWith($form, conf); + }); + +})(jQuery); diff --git a/src/modules/poland.js b/src/modules/poland.js new file mode 100644 index 0000000..f9eb467 --- /dev/null +++ b/src/modules/poland.js @@ -0,0 +1,117 @@ +/** + * jQuery Form Validator Module: Poland + * ------------------------------------------ + * Created by simivar + * + * This form validation module adds validators typically used on + * websites in Poland. This module adds the following validators: + * - plpesel + * + * @website http://formvalidator.net/#poland-validators + * @license MIT + */ +(function($) { + + $.formUtils.registerLoadedModule('poland'); + + /** + * PL PESEL - polish personal identity number (in Polish identity cards) validator + */ + $.formUtils.addValidator({ + name: 'plpesel', + validatorFunction: function(pesel){ + var weights = [1, 3, 7, 9, 1, 3, 7, 9, 1, 3], + checkSum = 0, checkDigit = 0; + + if( /\d{11}/.test( pesel ) && pesel.length === 11 ){ + for (var i = 0; i < 10; i++) { + checkSum += pesel[ i ] * weights[ i ]; + } + + if( checkSum % 10 !== 0 ){ + checkDigit = 10 - (checkSum % 10); + } + + if( parseInt( pesel.charAt( 10 ) ) === checkDigit ){ + return true; + } + } + + return false; + }, + errorMessage: '', + errorMessageKey: 'badPlPesel' + }); + + /** + * PL NIP - polish VAT identification number validator + */ + $.formUtils.addValidator({ + name: 'plnip', + validatorFunction: function(nip){ + var weights = [6, 5, 7, 2, 3, 4, 5, 6, 7], + checkSum = 0; + + if( /\d{10}/.test( nip ) && nip.length === 10 ){ + for (var i = 0; i < 9; i++) { + checkSum += nip[ i ] * weights[ i ]; + } + + if( parseInt( nip.charAt( 9 ) ) === checkSum % 11 ){ + return true; + } + } + + return false; + }, + errorMessage: '', + errorMessageKey: 'badPlNip' + }); + + /** + * PL REGON - polish bussiness identity number validator + */ + $.formUtils.addValidator({ + name: 'plregon', + validatorFunction: function(regon){ + var weightsNine = [8, 9, 2, 3, 4, 5, 6, 7], + weightsFourteen = [2, 4, 8, 5, 0, 9, 7, 3, 6, 1, 2, 4, 8], + checkSum = 0, checkDigit = 0; + + if( /(\d{14}|\d{9})/.test( regon ) && ( regon.length === 9 || regon.length === 14 ) ){ + for (var i = 0; i < 8; i++) { + checkSum += regon[ i ] * weightsNine[ i ]; + } + + if( checkSum % 11 !== 10 ){ + checkDigit = checkSum % 11; + } + + if( parseInt( regon.charAt( 8 ) ) === checkDigit ){ + if( regon.length === 14 ){ + checkSum = 0; + + for (i = 0; i < 13; i++) { + checkSum += regon[ i ] * weightsFourteen[ i ]; + } + + if( checkSum % 11 !== 10 ){ + checkDigit = checkSum % 11; + } + + if( parseInt( regon.charAt( 13 ) ) === checkDigit ){ + return true; + } + } else { + return true; + } + } + } + + return false; + }, + errorMessage: '', + errorMessageKey: 'badPlRegon' + }); + +})(jQuery); diff --git a/src/modules/sanitize.js b/src/modules/sanitize.js new file mode 100644 index 0000000..4934da0 --- /dev/null +++ b/src/modules/sanitize.js @@ -0,0 +1,223 @@ +/** + * jQuery Form Validator Module: sanitize + * ------------------------------------------ + * Created by Victor Jonsson + * + * This module makes it possible to add sanitation functions to + * inputs. The functions is triggered on blur. Example: + * + * + * + * Available functions are: + * - uppercase + * - lowercase + * - capitalize + * - trim + * - trimLeft + * - trimRight + * - numberFormat + * - insertLeft + * - insertRight + * - strip + * - escape (replace <, >, &, ' and " with HTML entities) + * + * @website http://formvalidator.net/ + * @license MIT + */ +(function($, window) { + + 'use strict'; + + $.formUtils.addSanitizer({ + name : 'upper', + sanitizerFunction : function(val) { + return val.toLocaleUpperCase(); + } + }); + + $.formUtils.addSanitizer({ + name : 'lower', + sanitizerFunction : function(val) { + return val.toLocaleLowerCase(); + } + }); + + $.formUtils.addSanitizer({ + name : 'trim', + sanitizerFunction : function(val) { + return $.trim(val); + } + }); + + $.formUtils.addSanitizer({ + name : 'trimLeft', + sanitizerFunction : function(val) { + return val.replace(/^\s+/,''); + } + }); + + $.formUtils.addSanitizer({ + name : 'trimRight', + sanitizerFunction : function(val) { + return val.replace(/\s+$/,''); + } + }); + + $.formUtils.addSanitizer({ + name : 'capitalize', + sanitizerFunction : function(val) { + var words = val.split(' '); + $.each(words, function(i, word) { + words[i] = word.substr(0,1).toUpperCase() + word.substr(1, word.length); + }); + return words.join(' '); + } + }); + + $.formUtils.addSanitizer({ + name : 'insert', + sanitizerFunction : function(val, $input, pos) { + var extra = ($input.attr('data-sanitize-insert-'+pos) || '').replace(/\[SPACE\]/g, ' '); + if ( (pos === 'left' && val.indexOf(extra) === 0) || (pos === 'right' && val.substring(val.length - extra.length) === extra)) { + return val; + } + return (pos === 'left' ? extra:'') + val + (pos === 'right' ? extra : ''); + } + }); + + $.formUtils.addSanitizer({ + name : 'insertRight', + sanitizerFunction : function(val, $input) { + return $.formUtils.sanitizers.insert.sanitizerFunction(val, $input, 'right'); + } + }); + + $.formUtils.addSanitizer({ + name : 'insertLeft', + sanitizerFunction : function(val, $input) { + return $.formUtils.sanitizers.insert.sanitizerFunction(val, $input, 'left'); + } + }); + + $.formUtils.addSanitizer({ + name : 'numberFormat', + sanitizerFunction : function(val, $input) { + if (val.length === 0) { + return val; + } + if ( 'numeral' in window ) { + //If this has been previously formatted, it needs to be unformatted first before being reformatted. + //Else numeral will fail + val = numeral().unformat(val); + val = numeral(val).format( $input.attr('data-sanitize-number-format') ); + } + else { + throw new ReferenceError('Using sanitation function "numberFormat" requires that you include numeral.js ' + + '(http://numeraljs.com/)'); + } + return val; + } + }); + + $.formUtils.addSanitizer({ + name : 'strip', + sanitizerFunction : function(val, $input) { + var toRemove = $input.attr('data-sanitize-strip') || ''; + $.split(toRemove, function(char) { + var regex = new RegExp($.isNumeric(char) ? char : '\\'+char, 'g'); + val = val.replace(regex, ''); + }); + return val; + } + }); + + $.formUtils.addSanitizer({ + name : 'escape', + sanitizerFunction : function(val, $input) { + var isEscaped = $input.valAttr('is-escaped'), + entities = { + '<' : '__%AMP%__lt;', + '>' : '__%AMP%__gt;', + '&' : '__%AMP%__amp;', + '\'': '__%AMP%__#8217;', + '"' : '__%AMP%__quot;' + }; + + if (isEscaped === 'yes') { + return val; + } + + $input.valAttr('is-escaped', 'yes'); + $input.one('keyup', function(evt) { + if(evt.keyCode !== 9) { + $input.valAttr('is-escaped', 'no'); + } + }); + + $.each(entities, function(symbol, replacement) { + val = val.replace(new RegExp(symbol, 'g'), replacement); + }); + + return val.replace(new RegExp('__\%AMP\%__', 'g'), '&'); + } + }); + + $.formUtils.registerLoadedModule('sanitize'); + + var inputsThatCantBeSanitized = '[type="button"], [type="submit"], [type="radio"], [type="checkbox"], [type="reset"], [type="search"]', + setupSanitation = function(evt, $forms, config) { + + if ( !$forms ) { + $forms = $('form'); + } + if ( !$forms.each ) { + $forms = $($forms); + } + + var execSanitationCommands = function() { + + var $input = $(this), + value = $input.val(); + $.split($input.attr('data-sanitize'), function(command) { + + var sanitizer = $.formUtils.sanitizers[command]; + + if (sanitizer) { + value = sanitizer.sanitizerFunction(value, $input, config); + } else { + throw new Error('Use of unknown sanitize command "'+command+'"'); + } + + }); + $input + .val(value) + .trigger('keyup.validation'); // we need to re-validate in case it gets validated on blur + }; + + $forms.each(function() { + var $form = $(this); + if( config.sanitizeAll ) { + $form.find('input,textarea').not(inputsThatCantBeSanitized).each(function() { + var $input = $(this), + sanitation = $input.attr('data-sanitize') || ''; + $input.attr('data-sanitize', config.sanitizeAll +' '+ sanitation); + }); + } + + $form.find('[data-sanitize]') + .unbind('blur.sanitation', execSanitationCommands) + .bind('blur.sanitation', execSanitationCommands); + + $(function() { + $form.trigger('blur.sanitation'); + }); + + }); + }; + + $(window).on('validatorsLoaded formValidationSetup', setupSanitation); + + // Only for unit testing + $.formUtils.setupSanitation = setupSanitation; + +})(jQuery, window); diff --git a/src/modules/security.js b/src/modules/security.js new file mode 100644 index 0000000..aa8ad1c --- /dev/null +++ b/src/modules/security.js @@ -0,0 +1,606 @@ +/** + * jQuery Form Validator Module: Security + * ------------------------------------------ + * Created by Victor Jonsson + * + * This module adds validators typically used in registration forms. + * This module adds the following validators: + * - spamcheck + * - confirmation + * - strength + * - backend + * - credit card + * - cvv + * + * @website http://formvalidator.net/#security-validators + * @license MIT + */ +(function ($, window) { + + 'use strict'; + + $.formUtils.registerLoadedModule('security'); + + /* + * Simple spam check + */ + $.formUtils.addValidator({ + name: 'spamcheck', + validatorFunction: function (val, $el) { + var attr = $el.valAttr('captcha'); + return attr === val; + }, + errorMessage: '', + errorMessageKey: 'badSecurityAnswer' + }); + + /* + * Validate confirmation (tests that two inputs are identical; usually used for + * passwords) + */ + $.formUtils.addValidator({ + name: 'confirmation', + validatorFunction: function (value, $el, config, language, $form) { + var password, + passwordInputName = $el.valAttr('confirm') || + ($el.attr('name') + '_confirmation'), + $passwordInput = $form.find('[name="' + passwordInputName + '"]'); + if (!$passwordInput.length) { + $.formUtils.warn('Password confirmation validator: could not find an input ' + + 'with name "' + passwordInputName + '"', true); + return false; + } + + password = $passwordInput.val(); + if (config.validateOnBlur && !$passwordInput[0].hasValidationCallback) { + $passwordInput[0].hasValidationCallback = true; + var keyUpCallback = function () { + $el.validate(); + }; + $passwordInput.on('keyup', keyUpCallback); + $form.one('formValidationSetup', function () { + $passwordInput[0].hasValidationCallback = false; + $passwordInput.off('keyup', keyUpCallback); + }); + } + + return value === password; + }, + errorMessage: '', + errorMessageKey: 'notConfirmed' + }); + + var creditCards = { + 'amex': [15, 15], + 'diners_club': [14, 14], + 'cjb': [16, 16], + 'laser': [16, 19], + 'visa': [16, 16], + 'mastercard': [16, 16], + 'maestro': [12, 19], + 'discover': [16, 16] + }, + checkOnlyAmex = false, + allowsAmex = false; + + /* + * Credit card + */ + $.formUtils.addValidator({ + name: 'creditcard', + validatorFunction: function (value, $el) { + var allowing = $.split($el.valAttr('allowing') || ''); + + // Setup for cvv validation + allowsAmex = $.inArray('amex', allowing) > -1; + checkOnlyAmex = allowsAmex && allowing.length === 1; + + // Correct length + if (allowing.length > 0) { + var hasValidLength = false; + $.each(allowing, function (i, cardName) { + if (cardName in creditCards) { + if (value.length >= creditCards[cardName][0] && value.length <= creditCards[cardName][1]) { + hasValidLength = true; + return false; + } + } else { + $.formUtils.warn('Use of unknown credit card "' + cardName + '"', true); + } + }); + + if (!hasValidLength) { + return false; + } + } + + // only numbers + if (value.replace(new RegExp('[0-9]', 'g'), '') !== '') { + return false; + } + + // http://en.wikipedia.org/wiki/Luhn_algorithm + // http://www.brainjar.com/js/validation/default2.asp + var checkSum = 0; + $.each(value.split('').reverse(), function (i, digit) { + digit = parseInt(digit, 10); + if (i % 2 === 0) { + checkSum += digit; + } else { + digit *= 2; + if (digit < 10) { + checkSum += digit; + } else { + checkSum += digit - 9; + } + } + }); + return checkSum % 10 === 0; + }, + errorMessage: '', + errorMessageKey: 'badCreditCard' + }); + + /* + * Credit card number + */ + $.formUtils.addValidator({ + name: 'cvv', + validatorFunction: function (val) { + if (val.replace(/[0-9]/g, '') === '') { + val = val + ''; + if (checkOnlyAmex) { + return val.length === 4; + } else if (allowsAmex) { + return val.length === 3 || val.length === 4; + } else { + return val.length === 3; + } + } + return false; + }, + errorMessage: '', + errorMessageKey: 'badCVV' + }); + + /* + * Validate password strength + */ + $.formUtils.addValidator({ + name: 'strength', + validatorFunction: function (val, $el) { + var requiredStrength = $el.valAttr('strength') || 2; + if (requiredStrength && requiredStrength > 3) { + requiredStrength = 3; + } + + return $.formUtils.validators.validate_strength.calculatePasswordStrength(val) >= requiredStrength; + }, + errorMessage: '', + errorMessageKey: 'badStrength', + + /** + * Code more or less borrowed from jQuery plugin "Password Strength Meter" + * written by Darren Mason (djmason9@gmail.com), myPocket technologies (www.mypocket-technologies.com) + * @param {String} password + * @return {Number} + */ + calculatePasswordStrength: function (password) { + + if (password.length < 4) { + return 0; + } + + var score = 0; + + var checkRepetition = function (pLen, str) { + var res = ''; + for (var i = 0; i < str.length; i++) { + var repeated = true; + + for (var j = 0; j < pLen && (j + i + pLen) < str.length; j++) { + repeated = repeated && (str.charAt(j + i) === str.charAt(j + i + pLen)); + } + if (j < pLen) { + repeated = false; + } + if (repeated) { + i += pLen - 1; + repeated = false; + } + else { + res += str.charAt(i); + } + } + return res; + }; + + //password length + score += password.length * 4; + score += ( checkRepetition(1, password).length - password.length ) * 1; + score += ( checkRepetition(2, password).length - password.length ) * 1; + score += ( checkRepetition(3, password).length - password.length ) * 1; + score += ( checkRepetition(4, password).length - password.length ) * 1; + + //password has 3 numbers + if (password.match(/(.*[0-9].*[0-9].*[0-9])/)) { + score += 5; + } + + //password has 2 symbols + if (password.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)) { + score += 5; + } + + //password has Upper and Lower chars + if (password.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)) { + score += 10; + } + + //password has number and chars + if (password.match(/([a-zA-Z])/) && password.match(/([0-9])/)) { + score += 15; + } + // + //password has number and symbol + if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([0-9])/)) { + score += 15; + } + + //password has char and symbol + if (password.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && password.match(/([a-zA-Z])/)) { + score += 15; + } + + //password is just a numbers or chars + if (password.match(/^\w+$/) || password.match(/^\d+$/)) { + score -= 10; + } + + //verifying 0 < score < 100 + if (score < 0) { + score = 0; + } + if (score > 100) { + score = 100; + } + + if (score < 20) { + return 0; + } + else if (score < 40) { + return 1; + } + else if (score <= 60) { + return 2; + } + else { + return 3; + } + }, + + strengthDisplay: function ($el, options) { + var config = { + fontSize: '12pt', + padding: '4px', + bad: 'Very bad', + weak: 'Weak', + good: 'Good', + strong: 'Strong' + }; + + if (options) { + $.extend(config, options); + } + + $el.bind('keyup', function () { + var val = $(this).val(), + $parent = typeof config.parent === 'undefined' ? $(this).parent() : $(config.parent), + $displayContainer = $parent.find('.strength-meter'), + strength = $.formUtils.validators.validate_strength.calculatePasswordStrength(val), + css = { + background: 'pink', + color: '#FF0000', + fontWeight: 'bold', + border: 'red solid 1px', + borderWidth: '0px 0px 4px', + display: 'inline-block', + fontSize: config.fontSize, + padding: config.padding + }, + text = config.bad; + + if ($displayContainer.length === 0) { + $displayContainer = $(''); + $displayContainer + .addClass('strength-meter') + .appendTo($parent); + } + + if (!val) { + $displayContainer.hide(); + } else { + $displayContainer.show(); + } + + if (strength === 1) { + text = config.weak; + } + else if (strength === 2) { + css.background = 'lightyellow'; + css.borderColor = 'yellow'; + css.color = 'goldenrod'; + text = config.good; + } + else if (strength >= 3) { + css.background = 'lightgreen'; + css.borderColor = 'darkgreen'; + css.color = 'darkgreen'; + text = config.strong; + } + + $displayContainer + .css(css) + .text(text); + }); + } + }); + + var requestServer = function (serverURL, $element, val, conf, callback) { + var reqParams = $element.valAttr('req-params') || $element.data('validation-req-params') || {}, + inputName = $element.valAttr('param-name') || $element.attr('name'), + handleResponse = function (response, callback) { + callback(response); + }; + + if (!inputName) { + throw new Error('Missing input name used for http requests made by server validator'); + } + if (!reqParams) { + reqParams = {}; + } + if (typeof reqParams === 'string') { + reqParams = $.parseJSON(reqParams); + } + reqParams[inputName] = val; + + $.ajax({ + url: serverURL, + type: 'POST', + cache: false, + data: reqParams, + dataType: 'json', + error: function (error) { + handleResponse({valid: false, message: 'Connection failed with status: ' + error.statusText}, callback); + return false; + }, + success: function (response) { + handleResponse(response, callback); + } + }); + }; + + /* + * Server validation + */ + $.formUtils.addAsyncValidator({ + name: 'server', + validatorFunction: function (done, val, $input, conf, lang, $form) { + var serverURL = $input.valAttr('url') || conf.backendUrl || document.location.href; + // @todo: deprecated class names that should be removed when moving up to 3.0 + $form.addClass('validating-server-side'); + $input.addClass('validating-server-side'); + requestServer(serverURL, $input, val, conf, function (response) { + $form.removeClass('validating-server-side'); + $input.removeClass('validating-server-side'); + if (response.message) { + $input.attr(conf.validationErrorMsgAttribute, response.message); + } + done(response.valid); + }); + }, + errorMessage: '', + errorMessageKey: 'badBackend' + }); + + /* + * Check for only letters and numbers + * + * http://www.slovo.info/testuni.htm + */ + $.formUtils.addValidator({ + name: 'letternumeric', + validatorFunction: function (val, $el, config, language) { + var patternStart = '^([a-zA-Z0-9\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC', + patternEnd = ']+)$', + additionalChars = $el.valAttr('allowing'), + pattern = ''; + + if (additionalChars) { + pattern = patternStart + additionalChars + patternEnd; + var extra = additionalChars.replace(/\\/g, ''); + if (extra.indexOf(' ') > -1) { + extra = extra.replace(' ', ''); + extra += language.andSpaces || $.formUtils.LANG.andSpaces; + } + this.errorMessage = language.badAlphaNumeric + language.badAlphaNumericExtra + extra; + } else { + pattern = patternStart + patternEnd; + this.errorMessage = language.badAlphaNumeric; + } + + return new RegExp(pattern).test(val); + }, + errorMessage: '', + errorMessageKey: 'requiredFields' + }); + + /* + * Check password content depending on following parameters: + * data-validation-require-uc-letter, + * data-validation-require-lc-letter, + * data-validation-require-special-char, + * data-validation-require-numeral + */ + $.formUtils.addValidator({ + name : 'complexity', + validatorFunction : function(value, $input, config, language) { + var numRequiredUppercaseChars = $input.valAttr('require-uc-letter') || '0', + numRequiredLowercaseChars = $input.valAttr('require-lc-letter') || '0', + numRequiredSpecialChars = $input.valAttr('require-special-char') || '0', + numRequiredNumericChars = $input.valAttr('require-numeral') || '0', + numRequiredCharsTotal = $input.valAttr('require-length') || '0', + subValidators = { + 'uc-letter': { + pattern: '^(?=(?:.*[A-Z]){'+numRequiredUppercaseChars+',}).+', + numRequired: numRequiredUppercaseChars, + dialogEnd: language.passwordComplexityUppercaseInfo + }, + 'lc-letter': { + pattern: '^(?=(?:.*[a-z]){'+numRequiredLowercaseChars+',}).+', + numRequired: numRequiredLowercaseChars, + dialogEnd: language.passwordComplexityLowercaseInfo + }, + 'special-char': { + pattern: '^(?=(?:.*(_|[!"#$%&\'()*+\\\\,-./:;<=>?@[\\]^_`{|}~])){'+numRequiredSpecialChars+',}).+', + numRequired: numRequiredSpecialChars, + dialogEnd: language.passwordComplexitySpecialCharsInfo + }, + 'numeral': { + pattern: '^(?=(?:.*\\d){'+numRequiredNumericChars+',}).+', + numRequired: numRequiredNumericChars, + dialogEnd: language.passwordComplexityNumericCharsInfo + }, + 'length': { + callback: function(val) { + return val.length >= numRequiredCharsTotal; + }, + numRequired: numRequiredCharsTotal, + dialogEnd: language.lengthBadEnd + } + }, + errorMessage = ''; + + $.each(subValidators, function(name, subValidator) { + var numRequired = parseInt(subValidator.numRequired, 10); + if (numRequired) { + var regexp = new RegExp(subValidator.pattern), + valid = false; + + if (subValidator.callback) { + valid = subValidator.callback(value); + } else { + valid = regexp.test(value); + } + + if (!valid) { + if (errorMessage === '') { + errorMessage = language.passwordComplexityStart; + } + errorMessage += language.passwordComplexitySeparator + numRequired + subValidator.dialogEnd; + $input.trigger('complexityRequirementValidation', [false, name]); + } else { + $input.trigger('complexityRequirementValidation', [true, name]); + } + } + }); + if (errorMessage) { + this.errorMessage = errorMessage + language.passwordComplexityEnd; + return false; + } else { + return true; + } + }, + errorMessage : '', + errorMessageKey: '' + }); + + /* + * Google reCaptcha 2 + */ + $.formUtils.addValidator({ + name: 'recaptcha', + validatorFunction: function (val, $el) { + return grecaptcha.getResponse($el.valAttr('recaptcha-widget-id')) !== ''; + }, + errorMessage: '', + errorMessageKey: 'badreCaptcha' + }); + + $.fn.displayPasswordStrength = function (conf) { + new $.formUtils.validators.validate_strength.strengthDisplay(this, conf); + return this; + }; + + var setupGooglereCaptcha = function (evt, $forms, config) { + if (!$forms) { + $forms = $('form'); + } + if (typeof grecaptcha !== 'undefined' && !$.formUtils.hasLoadedGrecaptcha) { + throw new Error('reCaptcha API can not be loaded by hand, delete reCaptcha API snippet.'); + } else if (!$.formUtils.hasLoadedGrecaptcha && $('[data-validation~="recaptcha"]', $forms).length) { + $.formUtils.hasLoadedGrecaptcha = true; + + var src = '//www.google.com/recaptcha/api.js?onload=reCaptchaLoaded&render=explicit' + (config.lang ? '&hl=' + config.lang : ''); + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.async = true; + script.defer = true; + script.src = src; + document.getElementsByTagName('body')[0].appendChild(script); + } + }; + + window.reCaptchaLoaded = function ($forms) { + if (!$forms || typeof $forms !== 'object' || !$forms.length) { + $forms = $('form'); + } + + $forms.each(function () { + var $form = $(this), + config = $form.get(0).validationConfig || $form.context.validationConfig || false; + + if (config) { + $('[data-validation~="recaptcha"]', $form).each(function () { + var $input = $(this), + div = document.createElement('DIV'), + siteKey = config.reCaptchaSiteKey || $input.valAttr('recaptcha-sitekey'), + theme = config.reCaptchaTheme || $input.valAttr('recaptcha-theme') || 'light', + size = config.reCaptchaSize || $input.valAttr('recaptcha-size') || 'normal', + type = config.reCaptchaType || $input.valAttr('recaptcha-type') || 'image'; + + if (!siteKey) { + throw new Error('Google reCaptcha site key is required.'); + } + + var widgetId = grecaptcha.render(div, { + sitekey: siteKey, + theme: theme, + size: size, + type: type, + callback: function (result) { + $form.find('[data-validation~="recaptcha"]') + .trigger('validation', (result && result !== '')); + + }, + 'expired-callback': function() { + $form.find('[data-validation~="recaptcha"]').trigger('validation', false); + } + }); + $input + .valAttr('recaptcha-widget-id', widgetId) + .hide() + .on('beforeValidation', function (evt) { + // prevent validator from skipping this input because its hidden + evt.stopImmediatePropagation(); + }) + .parent() + .append(div); + }); + } + }); + }; + + $(window).on('validatorsLoaded formValidationSetup', setupGooglereCaptcha); + +})(jQuery, window); diff --git a/src/modules/sepa.js b/src/modules/sepa.js new file mode 100644 index 0000000..9bb25be --- /dev/null +++ b/src/modules/sepa.js @@ -0,0 +1,199 @@ +// jQuery Form Validator Module: SEPA +// Author: PispalanIT, Joni Saarinen +// +// Code based on https://github.com/arhs/iban.js/blob/master/iban.js + +(function($) { + + 'use strict'; + + $.formUtils.registerLoadedModule('sepa'); + + var ibanCountryList = [ + ['AD', 24, 'F04F04A12'], + ['AE', 23, 'F03F16'], + ['AL', 28, 'F08A16'], + ['AT', 20, 'F05F11'], + ['AZ', 28, 'U04A20'], + ['BA', 20, 'F03F03F08F02'], + ['BE', 16, 'F03F07F02'], + ['BG', 22, 'U04F04F02A08'], + ['BH', 22, 'U04A14'], + ['BR', 29, 'F08F05F10U01A01'], + ['CH', 21, 'F05A12'], + ['CR', 21, 'F03F14'], + ['CY', 28, 'F03F05A16'], + ['CZ', 24, 'F04F06F10'], + ['DE', 22, 'F08F10'], + ['DK', 18, 'F04F09F01'], + ['DO', 28, 'U04F20'], + ['EE', 20, 'F02F02F11F01'], + ['ES', 24, 'F04F04F01F01F10'], + ['FI', 18, 'F06F07F01'], + ['FO', 18, 'F04F09F01'], + ['FR', 27, 'F05F05A11F02'], + ['GB', 22, 'U04F06F08'], + ['GE', 22, 'U02F16'], + ['GI', 23, 'U04A15'], + ['GL', 18, 'F04F09F01'], + ['GR', 27, 'F03F04A16'], + ['GT', 28, 'A04A20'], + ['HR', 21, 'F07F10'], + ['HU', 28, 'F03F04F01F15F01'], + ['IE', 22, 'U04F06F08'], + ['IL', 23, 'F03F03F13'], + ['IS', 26, 'F04F02F06F10'], + ['IT', 27, 'U01F05F05A12'], + ['KW', 30, 'U04A22'], + ['KZ', 20, 'F03A13'], + ['LB', 28, 'F04A20'], + ['LC', 32, 'U04F24'], + ['LI', 21, 'F05A12'], + ['LT', 20, 'F05F11'], + ['LU', 20, 'F03A13'], + ['LV', 21, 'U04A13'], + ['MC', 27, 'F05F05A11F02'], + ['MD', 24, 'U02A18'], + ['ME', 22, 'F03F13F02'], + ['MK', 19, 'F03A10F02'], + ['MR', 27, 'F05F05F11F02'], + ['MT', 31, 'U04F05A18'], + ['MU', 30, 'U04F02F02F12F03U03'], + ['NL', 18, 'U04F10'], + ['NO', 15, 'F04F06F01'], + ['PK', 24, 'U04A16'], + ['PL', 28, 'F08F16'], + ['PS', 29, 'U04A21'], + ['PT', 25, 'F04F04F11F02'], + ['RO', 24, 'U04A16'], + ['RS', 22, 'F03F13F02'], + ['SA', 24, 'F02A18'], + ['SE', 24, 'F03F16F01'], + ['SI', 19, 'F05F08F02'], + ['SK', 24, 'F04F06F10'], + ['SM', 27, 'U01F05F05A12'], + ['ST', 25, 'F08F11F02'], + ['TL', 23, 'F03F14F02'], + ['TN', 24, 'F02F03F13F02'], + ['TR', 26, 'F05F01A16'], + ['VG', 24, 'U04F16'], + ['XK', 20, 'F04F10F02'], + ['AO', 25, 'F21'], + ['BF', 27, 'F23'], + ['BI', 16, 'F12'], + ['BJ', 28, 'F24'], + ['CI', 28, 'U01F23'], + ['CM', 27, 'F23'], + ['CV', 25, 'F21'], + ['DZ', 24, 'F20'], + ['IR', 26, 'F22'], + ['JO', 30, 'A04F22'], + ['MG', 27, 'F23'], + ['ML', 28, 'U01F23'], + ['MZ', 25, 'F21'], + ['QA', 29, 'U04A21'], + ['SN', 28, 'U01F23'], + ['UA', 29, 'F25'] + ]; + + var generalValidatorFunction = function (sepa) { + sepa = sepa.replace(/\s+/g, ''); + sepa = sepa.substr(4) + sepa.substr(0,4); + + sepa = sepa.split('').map(function(n){ + var code = n.charCodeAt(0); + if (code >= 'A'.charCodeAt(0) && code <= 'Z'.charCodeAt(0)){ + //A = 10, B = 11, ... Z = 35 + return code - 'A'.charCodeAt(0) + 10; + } else { + return n; + } + }).join(''); + + var remainder = sepa; + var block; + + while (remainder.length > 2) { + block = remainder.slice(0, 9); + remainder = (parseInt(block, 10) % 97).toString() + remainder.slice(block.length); + } + + if (parseInt(remainder, 10) % 97 === 1){ + return true; + } else { + return false; + } + }; + + var countryIBAN = function(sepa) { + sepa = sepa.toUpperCase(); + sepa = sepa.replace(/\s+/g, ''); + + var countryCode = sepa.slice(0,2); + var i = 0; + var structure = ''; + + for (i = 0; i < ibanCountryList.length; ++i){ + if (ibanCountryList[i][0] === countryCode){ + structure = ibanCountryList[i][2]; + break; + } + } + + if (structure === ''){ + return false; + } + + var regex = structure.match(/(.{3})/g).map(function(block){ + + // parse each structure block (1-char + 2-digits) + var format; + var pattern = block.slice(0, 1); + var repeats = parseInt(block.slice(1), 10); + + switch (pattern){ + case 'A': format = '0-9A-Za-z'; break; + case 'B': format = '0-9A-Z'; break; + case 'C': format = 'A-Za-z'; break; + case 'F': format = '0-9'; break; + case 'L': format = 'a-z'; break; + case 'U': format = 'A-Z'; break; + case 'W': format = '0-9a-z'; break; + } + + return '([' + format + ']{' + repeats + '})'; + }); + + var regextest = new RegExp('^' + regex.join('') + '$'); + + return sepa.length === ibanCountryList[i][1] && regextest.test(sepa.slice(4)); + }; + + + $.formUtils.addValidator({ + name: 'sepa', + validatorFunction: generalValidatorFunction, + errorMessage: '', + errorMessageKey:'badSepa' + }); + + $.formUtils.addValidator({ + name: 'iban', + validatorFunction: function(sepa) { + return countryIBAN(sepa) && generalValidatorFunction(sepa); + }, + errorMessage: '', + errorMessageKey:'badIban' + }); + + $.formUtils.addValidator({ + name: 'bic', + validatorFunction: function(bic) { + var regextest = new RegExp('^[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}$'); + return regextest.test(bic); + }, + errorMessage: '', + errorMessageKey:'badBic' + }); + +})(jQuery); diff --git a/src/modules/sweden.js b/src/modules/sweden.js new file mode 100644 index 0000000..5cf387c --- /dev/null +++ b/src/modules/sweden.js @@ -0,0 +1,219 @@ +/** + * jQuery Form Validator Module: Security + * ------------------------------------------ + * Created by Victor Jonsson + * + * This form validation module adds validators typically used on swedish + * websites. This module adds the following validators: + * - validate_swesec (Social security number) + * - validate_swemobile + * - validate_validate_municipality + * - validate_county + * - validate_swephone + * + * @website http://formvalidator.net/#swedish-validators + * @license MIT + */ +(function ($, window) { + + $.formUtils.registerLoadedModule('sweden'); + + + /* + * Validate swedish social security number yyyymmddXXXX + */ + $.formUtils.addValidator({ + name: 'swesec', + validatorFunction: function (securityNumber, $input) { + + var year, month, day, ssnParts; + + if ($input.valAttr('use-hyphen')) { + ssnParts = securityNumber.split('-'); + if (ssnParts.length !== 2) { + return false; + } + securityNumber = ssnParts.join(''); + } + + if (!securityNumber.match(/^(\d{4})(\d{2})(\d{2})(\d{4})$/)) { + return false; + } + + year = RegExp.$1; + month = $.formUtils.parseDateInt(RegExp.$2); + day = $.formUtils.parseDateInt(RegExp.$3); + + var ssnGender = ( parseInt((RegExp.$4).substring(2, 3)) % 2 ) === 0 ? 'female' : 'male'; + $input.trigger('genderDerived', [ssnGender]); + + // todo: remove when moving to version 3.0 + window.ssnGender = ssnGender; + + var months = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + if (year % 400 === 0 || year % 4 === 0 && year % 100 !== 0) { + months[1] = 29; + } + if (month < 1 || month > 12 || day < 1 || day > months[month - 1]) { + return false; + } + + securityNumber = securityNumber.substring(2, securityNumber.length); + var check = ''; + for (var i = 0; i < securityNumber.length; i++) { + check += ((((i + 1) % 2) + 1) * securityNumber.substring(i, i + 1)); + } + var checksum = 0; + for (i = 0; i < check.length; i++) { + checksum += parseInt(check.substring(i, i + 1), 10); + } + + return checksum % 10 === 0; + }, + errorMessage: '', + errorMessageKey: 'badSecurityNumber' + }); + + $.formUtils.addValidator({ + name: 'swecounty', + validatorFunction: function (str) { + str = str.toLowerCase(); + if ($.inArray(str, this.counties) === -1) { + if (str.substr(-3).toLocaleLowerCase() !== 'län') { + return $.inArray(str + 's län', this.counties) > -1; + } + + return false; + } + else { + return true; + } + }, + errorMessage: '', + errorMessageKey: 'badCustomVal', + counties: ['stockholms län', + 'uppsala län', + 'södermanlands län', + 'östergötlands län', + 'jönköpings län', + 'kronobergs län', + 'kalmar län', + 'gotlands län', + 'blekinge län', + 'skåne län', + 'hallands län', + 'västra götalands län', + 'värmlands län', + 'örebro län', + 'västmanlands län', + 'dalarnas län', + 'gävleborgs län', + 'västernorrlands län', + 'jämtlands län', + 'västerbottens län', + 'norrbottens län'] + }); + + $.formUtils.addValidator({ + name: 'swemunicipality', + validatorFunction: function (str) { + str = str.toLowerCase(); + if ($.inArray(str, this.municipalities) === -1) { + + // First check (dont return) + if (str.substr(-8) === 's kommun') { + if ($.inArray(str.substr(0, str.length - 8), this.municipalities) > -1) { + return true; + } + } + + // Second check + if (str.substr(-7) === ' kommun') { + return $.inArray(str.substr(0, str.length - 7), this.municipalities) > -1; + } + + return false; + } + else { + return true; + } + }, + errorMessage: '', + errorMessageKey: 'badCustomVal', + municipalities: ['ale', 'alingsås', 'alvesta', 'aneby', 'arboga', 'arjeplog', 'arvidsjaur', 'arvika', 'askersund', 'avesta', 'bengtsfors', 'berg', 'bjurholm', 'bjuv', 'boden', 'bollebygd', 'bollnäs', 'borgholm', 'borlänge', 'borås', 'botkyrka', 'boxholm', 'bromölla', 'bräcke', 'burlöv', 'båstad', 'dals-ed', 'danderyd', 'degerfors', 'dorotea', 'eda', 'ekerö', 'eksjö', 'emmaboda', 'enköpings', 'eskilstuna', 'eslövs', 'essunga', 'fagersta', 'falkenberg', 'falköping', 'falu', 'filipstad', 'finspång', 'flen', 'forshaga', 'färgelanda', 'gagnef', 'gislaved', 'gnesta', 'gnosjö', 'gotland', 'grum', 'grästorp', 'gullspång', 'gällivare', 'gävle', 'göteborg', 'götene', 'habo', 'hagfor', 'hallsberg', 'hallstahammar', 'halmstad', 'hammarö', 'haninge', 'haparanda', 'heby', 'hedemora', 'helsingborg', 'herrljunga', 'hjo', 'hofor', 'huddinge', 'hudiksvall', 'hultsfred', 'hylte', 'håbo', 'hällefor', 'härjedalen', 'härnösand', 'härryda', 'hässleholm', 'höganäs', 'högsby', 'hörby', 'höör', 'jokkmokk', 'järfälla', 'jönköping', 'kalix', 'kalmar', 'karlsborg', 'karlshamn', 'karlskoga', 'karlskrona', 'karlstad', 'katrineholm', 'kil', 'kinda', 'kiruna', 'klippan', 'knivsta', 'kramfors', 'kristianstad', 'kristinehamn', 'krokoms', 'kumla', 'kungsbacka', 'kungsör', 'kungälv', 'kävlinge', 'köping', 'laholm', 'landskrona', 'laxå', 'lekeberg', 'leksand', 'lerum', 'lessebo', 'lidingö', 'lidköping', 'lilla edets', 'lindesbergs', 'linköpings', 'ljungby', 'ljusdals', 'ljusnarsbergs', 'lomma', 'ludvika', 'luleå', 'lunds', 'lycksele', 'lysekil', 'malmö', 'malung-sälen', 'malå', 'mariestad', 'marks', 'markaryd', 'mellerud', 'mjölby', 'mora', 'motala', 'mullsjö', 'munkedal', 'munkfors', 'mölndal', 'mönsterås', 'mörbylånga', 'nacka', 'nora', 'norberg', 'nordanstig', 'nordmaling', 'norrköping', 'norrtälje', 'norsjö', 'nybro', 'nykvarn', 'nyköping', 'nynäshamn', 'nässjö', 'ockelbo', 'olofström', 'orsa', 'orust', 'osby', 'oskarshamn', 'ovanåker', 'oxelösund', 'pajala', 'partille', 'perstorp', 'piteå', 'ragunda', 'robertsfors', 'ronneby', 'rättvik', 'sala', 'salem', 'sandviken', 'sigtuna', 'simrishamn', 'sjöbo', 'skara', 'skellefteå', 'skinnskatteberg', 'skurup', 'skövde', 'smedjebacken', 'sollefteå', 'sollentuna', 'solna', 'sorsele', 'sotenäs', 'staffanstorp', 'stenungsund', 'stockholm', 'storfors', 'storuman', 'strängnäs', 'strömstad', 'strömsund', 'sundbyberg', 'sundsvall', 'sunne', 'surahammar', 'svalöv', 'svedala', 'svenljunga', 'säffle', 'säter', 'sävsjö', 'söderhamns', 'söderköping', 'södertälje', 'sölvesborg', 'tanum', 'tibro', 'tidaholm', 'tierp', 'timrå', 'tingsryd', 'tjörn', 'tomelilla', 'torsby', 'torså', 'tranemo', 'tranå', 'trelleborg', 'trollhättan', 'trosa', 'tyresö', 'täby', 'töreboda', 'uddevalla', 'ulricehamns', 'umeå', 'upplands väsby', 'upplands-bro', 'uppsala', 'uppvidinge', 'vadstena', 'vaggeryd', 'valdemarsvik', 'vallentuna', 'vansbro', 'vara', 'varberg', 'vaxholm', 'vellinge', 'vetlanda', 'vilhelmina', 'vimmerby', 'vindeln', 'vingåker', 'vårgårda', 'vänersborg', 'vännäs', 'värmdö', 'värnamo', 'västervik', 'västerås', 'växjö', 'ydre', 'ystad', 'åmål', 'ånge', 'åre', 'årjäng', 'åsele', 'åstorp', 'åtvidaberg', 'älmhult', 'älvdalen', 'älvkarleby', 'älvsbyn', 'ängelholm', 'öckerö', 'ödeshög', 'örebro', 'örkelljunga', 'örnsköldsvik', 'östersund', 'österåker', 'östhammar', 'östra göinge', 'överkalix', 'övertorneå'] + }); + + + /* + * Validate phone number, at least 7 digits only one hyphen and plus allowed + */ + $.formUtils.addValidator({ + name: 'swephone', + validatorFunction: function (tele) { + var numPlus = tele.match(/\+/g); + var numHifen = tele.match(/-/g); + + if ((numPlus !== null && numPlus.length > 1) || (numHifen !== null && numHifen.length > 1)) { + return false; + } + if (numPlus !== null && tele.indexOf('+') !== 0) { + return false; + } + + tele = tele.replace(/([-|\+])/g, ''); + return tele.length > 8 && tele.match(/[^0-9]/g) === null; + }, + errorMessage: '', + errorMessageKey: 'badTelephone' + }); + + + /* + * Validate that string is a swedish telephone number + */ + $.formUtils.addValidator({ + name: 'swemobile', + validatorFunction: function (number) { + if (!$.formUtils.validators.validate_swephone.validatorFunction(number)) { + return false; + } + + number = number.replace(/[^0-9]/g, ''); + var begin = number.substring(0, 3); + + if (number.length !== 10 && begin !== '467') { + return false; + } else if (number.length !== 11 && begin === '467') { + return false; + } + return (/07[0-9{1}]/).test(begin) || begin === '467'; + }, + errorMessage: '', + errorMessageKey: 'badTelephone' + }); + + /** + * @private + * @param {Array} listItems + * @return {Array} + */ + var _makeSortedList = function (listItems) { + var newList = []; + $.each(listItems, function (i, v) { + newList.push(v.substr(0, 1).toUpperCase() + v.substr(1, v.length)); + }); + newList.sort(); + return newList; + }; + + $.fn.suggestSwedishCounty = function (settings) { + var counties = _makeSortedList($.formUtils.validators.validate_swecounty.counties); + return $.formUtils.suggest(this, counties, settings); + }; + + $.fn.suggestSwedishMunicipality = function (settings) { + var municipalities = _makeSortedList($.formUtils.validators.validate_swemunicipality.municipalities); + return $.formUtils.suggest(this, municipalities, settings); + }; + +})(jQuery, window); diff --git a/src/modules/toggleDisabled.js b/src/modules/toggleDisabled.js new file mode 100644 index 0000000..7aaceef --- /dev/null +++ b/src/modules/toggleDisabled.js @@ -0,0 +1,119 @@ +/** + * jQuery Form Validator Module: Toggle Disabled + * ------------------------------------------ + * Created by Victor Jonsson + * + * This module will take care of disabling/enabling submit buttons + * in forms, depending on if the inputs of the form is valid or not. + * + * @website http://formvalidator.net/ + * @license MIT + */ +(function($, window, undefined) { + + 'use strict'; + + $.formUtils.registerLoadedModule('toggleDisabled'); + + // Function that can enable/disable form + var toggleFormState = function($form, state) { + if( state === 'disabled' ) { + $form.find('*[type="submit"]') + .addClass('disabled') + .attr('disabled', 'disabled'); + } else { + $form.find('*[type="submit"]') + .removeClass('disabled') + .removeAttr('disabled'); + } + }, + isCheckingIfFormValid = false; + + $.formUtils.$win.bind('validatorsLoaded formValidationSetup', function(evt, $forms, conf) { + + var $formsToDisable = conf.disabledFormFilter ? $forms.filter(conf.disabledFormFilter) : $forms, + showErrorDialogs = conf.showErrorDialogs === undefined || conf.showErrorDialogs, + afterValidationCallback = function(evt, result, evtContext) { + var $this = $(this); + if (evtContext && evtContext.indexOf('blur') > -1) { + $this.unbind('afterValidation', afterValidationCallback); + } else { + if (result.isValid) { + $this.unbind('afterValidation', afterValidationCallback); + } else if (!$this.valAttr('have-been-blurred')) { + result.shouldChangeDisplay = false; + } + } + }; + + // Toggle form state depending on if it has only valid inputs or not. + $formsToDisable + .addClass(showErrorDialogs ? 'disabled-with-errors' : 'disabled-without-errors') + .on('reset', function() { + toggleFormState($(this), 'disabled'); + }) + .find('*[data-validation]') + .valAttr('event','keyup change') + .on('validation', function(evt, valid) { + if (!isCheckingIfFormValid) { + isCheckingIfFormValid = true; + var $form = $(this).closest('form'); + if(valid && peekIfFormIsSuccessfullyValidated($form, this, conf)) { + toggleFormState($form, 'enabled'); + } else { + toggleFormState($form, 'disabled'); + } + isCheckingIfFormValid = false; + } + }) + .on('afterValidation', afterValidationCallback) + .on('blur', function() { + $(this).valAttr('have-been-blurred', 1); + }) + .each(function() { + var $input = $(this), + validationRules = $input.attr('data-validation'); + if (validationRules.indexOf('checkbox_group') > -1) { + $input.closest('form').find('input[name="'+$input.attr('name')+'"]').each(function() { + $(this).on('change', function() { + $input.validate(); + }); + }); + } + }); + + // Notice! Async validator can't be validated onkeyup + $formsToDisable.find('[data-validation-async]').valAttr('event', 'change'); + + // Make all inputs validated on keyup, require validateOnEvent in validation config + toggleFormState($formsToDisable, 'disabled'); + + $formsToDisable.validateOnEvent(conf.language, conf); + + }) + .on('validationErrorDisplay', function(evt, $input, $elem) { + if ( $input.closest('form').hasClass('disabled-without-errors') ) { + $elem.hide(); + } + }); + + // We want to peek at the form to check if all is valid, we don't want to trigger + // the validators since that seems to cause unwanted side effects, that's hard to foresee + function peekIfFormIsSuccessfullyValidated($form, excludeInputElement, config) { + var allValid = true; + $form.find('[data-validation]').each(function() { + if (this !== excludeInputElement) { + var $elem = $(this), + hasSuccessfullyValidated = $elem.hasClass(config.successElementClass), + isOptional = $elem.valAttr('optional') === 'true', + isInvalid = $elem.hasClass(config.errorElementClass); + if (isInvalid || (!hasSuccessfullyValidated && !isOptional)) { + allValid = false; + return false; + } + } + }); + return allValid; + } + +})(jQuery, window); diff --git a/form-validator/uk.dev.js b/src/modules/uk.js similarity index 64% rename from form-validator/uk.dev.js rename to src/modules/uk.js index 593e7f5..8eea8f7 100644 --- a/form-validator/uk.dev.js +++ b/src/modules/uk.js @@ -1,17 +1,28 @@ /** - * jQuery Form Validator Module: Security + * jQuery Form Validator Module: UK * ------------------------------------------ * Created by Victor Jonsson * * This form validation module adds validators typically used on * websites in the UK. This module adds the following validators: * - ukvatnumber + * - ukutr + * - uknin * * @website http://formvalidator.net/#uk-validators * @license MIT - * @version 2.2.83 */ -$.formUtils.addValidator({ +(function($) { + + 'use strict'; + + + $.formUtils.registerLoadedModule('uk'); + + /** + * UK VAT Validator + */ + $.formUtils.addValidator({ name : 'ukvatnumber', validatorFunction : function(number) { @@ -83,3 +94,50 @@ $.formUtils.addValidator({ errorMessage : '', errorMessageKey: 'badUKVatAnswer' }); + + /** + * UK Unique Taxpayer Reference Validator + */ + $.formUtils.addValidator({ + name: 'ukutr', + validatorFunction: function (utr) + { + var weights = [0, 6, 7, 8, 9, 10, 5, 4, 3, 2], + checkDigits = [2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1], + checkSum = 0; + + if (/\d{10}/.test(utr) && utr.length === 10) + { + for (var i = 0; i < 10; i++) { + checkSum += utr[ i ] * weights[ i ]; + } + + if (parseInt(utr.charAt(0)) === checkDigits[checkSum % 11]) + { + return true; + } + } + + return false; + }, + errorMessage: '', + errorMessageKey: 'badUkUtr' + }); + + /** + * UK National Insurance number Validator + */ + $.formUtils.addValidator({ + name: 'uknin', + validatorFunction: function(val){ + if( /^(?!BG)(?!GB)(?!NK)(?!KN)(?!TN)(?!NT)(?!ZZ)(?:[A-CEGHJ-PR-TW-Z][A-CEGHJ-NPR-TW-Z])(?:\s*\d\s*){6}([A-D]|\s)$/i.test( val ) ){ + return true; + } + + return false; + }, + errorMessage: '', + errorMessageKey: 'badUkNin' + }); + +})(jQuery); diff --git a/src/theme-default.css b/src/theme-default.css new file mode 100644 index 0000000..f0c5e5b --- /dev/null +++ b/src/theme-default.css @@ -0,0 +1,110 @@ +/** + * Default CSS theme for jQuery-Form-Validator. + * @author Victor Jonsson + */ + + +/* Input element having an invalid value */ +select.error, +input.error { + border-color: #b94a48; + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAARCAYAAAA/mJfHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAYSmlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjarVllVBV/t94TJ6hDdx26pLu7QboVOHRzODQYoIAICmKggoKCiogKBiklJqKIKKhYhIgoKgaKinI/gP7f9733frhr3d+HWc888+y9n73XrJk18wMQFqDR6XEoB0B8QgrD3daC6uvnTyW9ABSEgAJrQJUWmkw3d3V1gv95IQBfRwEBALivTKPT4+D/tjjDwpNDARBXAAgJSw6NB0AuAuBCoXRGCgBhCACk0lPoKQCELwDAw/D18wcgkgGAJ3IFiwAAT8gKVgMAHoanuyUA0QqAzEqjMSIBKK4AQE0LjUwBoNABiFwJYdEJADx5AEST0ChaGIDQVQBYEx+fGAYgNA8A8iH/kify33KG/M1Jo0X+xSu9AAAA2So6mR5Hy4T/7xUfl/qnhiQAsEYx7NwBgAcAORmb6OgOAKwASGdCyFo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yZGY6U2VxPgogICAgICAgICA8L3htcE1NOkhpc3Rvcnk+CiAgICAgICAgIDxwaG90b3Nob3A6VGV4dExheWVycz4KICAgICAgICAgICAgPHJkZjpCYWc+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8cGhvdG9zaG9wOkxheWVyTmFtZT7DlzwvcGhvdG9zaG9wOkxheWVyTmFtZT4KICAgICAgICAgICAgICAgICAgPHBob3Rvc2hvcDpMYXllclRleHQ+w5c8L3Bob3Rvc2hvcDpMYXllclRleHQ+CiAgICAgICAgICAgICAgIDwvcmRmOmxpPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHBob3Rvc2hvcDpMYXllck5hbWU+YTwvcGhvdG9zaG9wOkxheWVyTmFtZT4KICAgICAgICAgICAgICAgICAgPHBob3Rvc2hvcDpMYXllclRleHQ+YTwvcGhvdG9zaG9wOkxheWVyVGV4dD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOkJhZz4KICAgICAgICAgPC9waG90b3Nob3A6VGV4dExheWVycz4KICAgICAgICAgPHBob3Rvc2hvcDpDb2xvck1vZGU+MzwvcGhvdG9zaG9wOkNvbG9yTW9kZT4KICAgICAgICAgPHBob3Rvc2hvcDpJQ0NQcm9maWxlPkRpc3BsYXk8L3Bob3Rvc2hvcDpJQ0NQcm9maWxlPgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpYUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyMDAwMC8xMDAwMDwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT42NTUzNTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTk8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MTc8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/Pmkb7KYAAAAgY0hSTQAAbZgAAHOOAAD6zAAAhPoAAHmBAAD9EwAAMG0AABIpDR4mTgAAAOZJREFUeNrMlL0NwyAQhZ+jLJAVkE4M4BVMR50RvIIzAivYI6S+zh4hHgAhZYWM4DTnCCFsoshFnkQBB9/9impZFhylEw5UFsaaatbUbj1iTR1ruhRhrKkGMALoWVOXsY8AHIAHa1KlyO4AVq+ONbkE1MhWAejjh+cMbBDPqzqJQAGoM3c/qnLdlPRcod7G+jAVYQJs0zT2QKXRmADMufMcaC9NJR1VW46sD6YI2wC9og7HkV+tD6/SaKQgIytWk9Y0B5tTkPVhljqZnbubNevFs7E+PBNbI9HfrA/DV6Pxn7/Gr3oPAAwLXEdIhTGuAAAAAElFTkSuQmCC'); + background-position: right 5px center; + background-repeat: no-repeat; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); + box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); +} + +/* Input element having a valid value */ +select.valid, +input.valid { + border-color: #468847; + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAgVBMVEUAAABetV5buFtcuFxcuVxdu11cuFxbuFtcuFxcuFxbtltcuFxbtltetl5cuFxct1xduV1fuF9cuFxcuFxbultcuFxduF1gtWBduV1cuFxcuVxcuFxcuFxcuFxet15dt11cuFxcuFxbt1teuF5duV1euF5cuVxcuFxcuFxcuFwAAADG3XcxAAAAKXRSTlMAJrDPRSnn1OjCKvM4MamLFivp8jvI1xgs6jpL++w5UvrxUU83RMe6MlhBCPsAAAABYktHRACIBR1IAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4AwTFzUBkZPjhwAAAHBJREFUGNNjYCAJMDIxsyDzWdk0NdmR+RyampqcCD4XiM/Nw8DLxy8A4gsKAfnCIgwMopqaYuIMDBIwPgOzJkhEQhLElwIplZYBMmWFQXw5iGHyCppgoCgHM14JLKLIg7BQGSiiqILsRFU1dQ3iPQgAPhMLEPHXqSUAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTYtMTItMTlUMjM6NTM6MDErMDE6MDCbiS6WAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE2LTEyLTE5VDIzOjUzOjAxKzAxOjAw6tSWKgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAASUVORK5CYII='); + background-position: right 5px center; + background-repeat: no-repeat; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); + box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); +} + +/* File inputs with invalid value */ +input[type="file"].error { + color: #b94a48; + background: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +/* File inputs with valid value */ +input[type="file"].valid { + color: #468847; + background: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +/* Element showing an inline error message */ +.form-error { + display: block; + color: #b94a48; + margin-top: 5px; + margin-bottom: 10px; + line-height: 140%; +} + +/* Element showing the help text declared in data-validation-help */ +span.help { + color: #999; + font-size: 90%; +} + +/* Here you can style the look of the input while server being + requested when using data-validation="server" */ +select.async-validation, +input.async-validation, +select.validating-server-side, /* deprecated */ +input.validating-server-side /* deprecated */ { + opacity: 0.5; + background-image: url('data:image/gif;base64,R0lGODlhEAAQAPQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+vhQUFJycnAQEBDY2NmhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA=='); + background-position: right 5px center; + background-repeat: no-repeat; + background-color: #FFF; +} + +/* Here you can style the entire form while server being + requested when using data-validation="server" */ +form.async-validation, +form.validating-server-side /* deprecated */ { + +} + +/* Container for error messages when having configuration + parameter "errorMessagePosition" set to "top" */ +div.form-error { + background-color: #f2dede; + padding: 15px; + margin-bottom: 20px; + border: #b94a48 1px solid; + border-radius: 4px; +} + +/* Title in top of the error message container */ +div.form-error strong { + font-weight: bold; + display: block; + margin: 0; + padding: 0 0 10px; +} + +/* Typography styling in the error message container */ +div.form-error strong, +div.form-error ul li { + line-height: 140%; + color: #b94a48; + font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; + font-size: 14px; +} + +div.form-error ul, +div.form-error ul li { + background: none; +} diff --git a/test/bootstrap3.html b/test/bootstrap3.html new file mode 100644 index 0000000..f724db1 --- /dev/null +++ b/test/bootstrap3.html @@ -0,0 +1,224 @@ + + + + + Bootstrap 3 Compatibility Test + + + +
    +

    Not Bootstrap form

    +
    +

    Text + +

    +

    Check + CheckBox 1 + CheckBox 2 + CheckBox 3 +

    +

    Select + Radio 1 + Radio 2 + Radio 3 +

    + +
    +
    +

    Basic form

    +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +

    Inline form

    +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +

    Horizontal form

    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    + + + + + diff --git a/test/form.html b/test/form.html index be04749..c642d69 100644 --- a/test/form.html +++ b/test/form.html @@ -3,8 +3,8 @@ Form Test - - + + @@ -68,7 +68,7 @@
    - +
    @@ -83,7 +83,7 @@ data-validation="length date" data-validation-length="min5" data-validation-format="yyyy/mm/dd" - data-suggestions="2014/01/15,2014/01/16,2014/01/17" /> + data-suggestions="2014/01/15, 2014/01/16,2014/01/17" />
    @@ -95,12 +95,13 @@
    - + + />
    @@ -158,21 +159,22 @@
    + data-validation-url="http://www.formvalidator.net/validate-email.php" />
    + data-validation-max-size="400kb" + data-validation-error-msg-size="The file cant be larger than 400kb" + data-validation-error-msg-dimension="The image cant be smaller than 100x100 pixels and not larger than 800x800 pixels" + data-validation-error-msg="You must upload an image file (jpg,png or ico, max 400 kb)" + />
    @@ -180,7 +182,7 @@ data-validation="extension required" data-validation-error-msg="You must write a file name with extension jpg|png|ico" data-validation-allowing="jpg, png, ico" - /> + />
    -
    +
    +
    - + + +
    +
    + + +
    +
    + + data-validation="alphanumeric" + data-validation-error-msg="Invalid above..." + data-validation-if-checked="checker" />
    - + Checkbox
    -
    - +
    + +
    +

    @@ -295,7 +316,7 @@

    HTML5 attributes

    - +
    @@ -305,6 +326,10 @@

    HTML5 attributes

    +
    + + +
    @@ -345,103 +370,149 @@

    Validation Module: Brazil

    +
    +
    +

    Validation Module: Poland

    +
    + + +
    +
    + + +
    +
    + + +
    +

    + + +

    +
    - - - + + + diff --git a/test/logic.html b/test/logic.html new file mode 100644 index 0000000..9d86829 --- /dev/null +++ b/test/logic.html @@ -0,0 +1,125 @@ + + + + + Module Logic + + + + +
    +
    + +

    data-validation-depends-on

    + +
    + +
    + +
    + + +
    + + +
    + + +
    + +
    + + +
    + +
    + +
    + +
    +
    + +
    + +
    +
    + +

    data-validation-if-answered

    + + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + +
    + +
    +
    + + + + + + + diff --git a/test/qunit.html b/test/qunit.html index 8cecfda..1f006b6 100644 --- a/test/qunit.html +++ b/test/qunit.html @@ -3,7 +3,7 @@ QUnit Tests - + @@ -11,9 +11,10 @@
    - + + - + + + + + + +