Skip to content

Commit 6c739cc

Browse files
committed
fix for issue victorjonsson#137 and added unit tests for victorjonsson#156
1 parent 42bedab commit 6c739cc

11 files changed

+49
-20
lines changed

form-validator/date.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @website http://formvalidator.net/#location-validators
1212
* @license Dual licensed under the MIT or GPL Version 2 licenses
13-
* @version 2.1.66
13+
* @version 2.1.67
1414
*/
1515
(function($) {
1616

form-validator/file.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @website http://formvalidator.net/
1212
* @license Dual licensed under the MIT or GPL Version 2 licenses
13-
* @version 2.1.66
13+
* @version 2.1.67
1414
*/
1515
(function($, window) {
1616

form-validator/form-test.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,14 @@
227227
<label class="control-label">Test</label>
228228
<input name="test" data-validation="number" type="text" />
229229
</div>
230+
<div class="form-group">
231+
<label class="control-label">Password</label>
232+
<input name="pass" data-validation="confirmation" type="password" />
233+
</div>
234+
<div class="form-group">
235+
<label class="control-label">Password again</label>
236+
<input name="pass_confirmation" type="password" />
237+
</div>
230238
<p>
231239
<input type="submit" class="button">
232240
<input type="reset" class="button">

form-validator/html5.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* @website http://formvalidator.net/
1919
* @license Dual licensed under the MIT or GPL Version 2 licenses
20-
* @version 2.1.66
20+
* @version 2.1.67
2121
*/
2222
(function($, window) {
2323

form-validator/jquery.form-validator.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* @website http://formvalidator.net/
77
* @license Dual licensed under the MIT or GPL Version 2 licenses
8-
* @version 2.1.66
8+
* @version 2.1.67
99
*/
1010
(function($) {
1111

@@ -1269,21 +1269,21 @@
12691269
badTelephone : 'You have not given a correct phone number',
12701270
badSecurityAnswer : 'You have not given a correct answer to the security question',
12711271
badDate : 'You have not given a correct date',
1272-
lengthBadStart : 'You must give an answer between ',
1272+
lengthBadStart : 'The input value must be between ',
12731273
lengthBadEnd : ' characters',
1274-
lengthTooLongStart : 'You have given an answer longer than ',
1275-
lengthTooShortStart : 'You have given an answer shorter than ',
1276-
notConfirmed : 'Values could not be confirmed',
1274+
lengthTooLongStart : 'The input value is longer than ',
1275+
lengthTooShortStart : 'The input value is shorter than ',
1276+
notConfirmed : 'Input values could not be confirmed',
12771277
badDomain : 'Incorrect domain value',
1278-
badUrl : 'The answer you gave was not a correct URL',
1279-
badCustomVal : 'You gave an incorrect answer',
1280-
badInt : 'The answer you gave was not a correct number',
1281-
badSecurityNumber : 'Your isVsocial security number was incorrect',
1278+
badUrl : 'The input value is not a correct URL',
1279+
badCustomVal : 'The input value is incorrect',
1280+
badInt : 'The input value was not a correct number',
1281+
badSecurityNumber : 'Your social security number was incorrect',
12821282
badUKVatAnswer : 'Incorrect UK VAT Number',
12831283
badStrength : 'The password isn\'t strong enough',
12841284
badNumberOfSelectedOptionsStart : 'You have to choose at least ',
12851285
badNumberOfSelectedOptionsEnd : ' answers',
1286-
badAlphaNumeric : 'The answer you gave must contain only alphanumeric characters ',
1286+
badAlphaNumeric : 'The input value can only contain alphanumeric characters ',
12871287
badAlphaNumericExtra: ' and ',
12881288
wrongFileSize : 'The file you are trying to upload is too large',
12891289
wrongFileType : 'The file you are trying to upload is of wrong type',

form-validator/jquery.form-validator.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

form-validator/location.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @website http://formvalidator.net/#location-validators
1212
* @license Dual licensed under the MIT or GPL Version 2 licenses
13-
* @version 2.1.66
13+
* @version 2.1.67
1414
*/
1515
(function($) {
1616

form-validator/qunit.html

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696

9797
$input = input('sam', {'':'required alphanumeric length', length:'min10', 'error-msg-alphanumeric':'custom for alphanum'}),
9898
mess = $.formUtils.validateInput($input, $.formUtils.LANG, $.formUtils.defaultConfig(), $form);
99-
equal('You have given an answer shorter than 10 characters', mess, 'Incorrect message');
99+
equal('The input value is shorter than 10 characters', mess, 'Incorrect message');
100100

101101
});
102102

@@ -535,6 +535,27 @@
535535
true,
536536
'Could not validate confirmation'
537537
);
538+
539+
clearForm();
540+
541+
var $inputC = input('value', {'':'confirmation', 'confirm':'input-D'}, {name:'test'}),
542+
$inputD = input('hej', undefined, {name:'input-D'});
543+
544+
result = $.formUtils.validateInput($inputC, $.formUtils.LANG, $.formUtils.defaultConfig(), $form);
545+
546+
equal(
547+
typeof(result) == 'string', // Should be an error message
548+
true,
549+
'Could not check that inputs did not confirmation each other'
550+
);
551+
552+
$inputD.val('value');
553+
result = $.formUtils.validateInput($inputC, $.formUtils.LANG, $.formUtils.defaultConfig(), $form);
554+
equal(
555+
result,
556+
true,
557+
'Could not validate confirmation'
558+
);
538559
});
539560

540561
// TODO: Write more tests...

form-validator/security.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* - cvv
1414
*
1515
* @website http://formvalidator.net/#security-validators
16-
* @version 2.1.66
16+
* @version 2.1.67
1717
*/
1818
(function($, window) {
1919

form-validator/sweden.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @website http://formvalidator.net/#swedish-validators
1515
* @license Dual licensed under the MIT or GPL Version 2 licenses
16-
* @version 2.1.66
16+
* @version 2.1.67
1717
*/
1818
(function($, window) {
1919

form-validator/uk.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
* @website http://formvalidator.net/#uk-validators
1111
* @license Dual licensed under the MIT or GPL Version 2 licenses
12-
* @version 2.1.66
12+
* @version 2.1.67
1313
*/
1414
$.formUtils.addValidator({
1515
name : 'ukvatnumber',

0 commit comments

Comments
 (0)