Skip to content

Commit 9986d10

Browse files
committed
required input now rejects whitespace only value
1 parent 385bd42 commit 9986d10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/validator/validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251

252252
v.fn("[required]", "Please complete this mandatory field.", function(el, v) {
253253
if (el.is(":checkbox")) { return el.is(":checked"); }
254-
return !!v;
254+
return !!$.trim(v);
255255
});
256256

257257
v.fn("[pattern]", function(el, v) {

0 commit comments

Comments
 (0)