Skip to content

Commit 0e5f7ce

Browse files
author
tom bertrand
committed
- Fixed OPTIONAL issue when the validate field contains space character only
1 parent 0202648 commit 0e5f7ce

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

jquery.validation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@
530530
if (validationArray instanceof Array && validationArray.length > 0) {
531531

532532
// "OPTIONAL" input will not be validated if it's empty
533-
if (value === '' && ~validationArray.indexOf('OPTIONAL')) {
533+
if ($.trim(value) === '' && ~validationArray.indexOf('OPTIONAL')) {
534534
return true;
535535
}
536536

0 commit comments

Comments
 (0)