Skip to content

Commit fa274b1

Browse files
committed
Fixed rules
NOTEMPTY MIXED OPTIONAL
1 parent 9a37166 commit fa274b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jquery.validation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@
3636
* RegExp rules
3737
*/
3838
var _rules = {
39-
NOTEMPTY: /./,
39+
NOTEMPTY: /\S/,
4040
INTEGER: /^\d+$/,
4141
NUMERIC: /^\d+(?:[,|\s]\d{3})?(?:\.\d+)?$/,
42-
MIXED: /^[\w\s-]+$/,
42+
MIXED: /^['\w\s-]+$/,
4343
NOSPACE: /^(?!\s)\S*$/,
4444
TRIM: /^[^\s].*[^\s]$/,
4545
DATE: /^\d{4}-\d{2}-\d{2}(\s\d{2}:\d{2}(:\d{2})?)?$/,
4646
EMAIL: /^([^@]+?)@(([a-z0-9]-*)*[a-z0-9]+\.)+([a-z0-9]+)$/i,
4747
URL: /^(https?:\/\/)?((([a-z0-9]-*)*[a-z0-9]+\.?)*([a-z0-9]+))(\/[\w?=\.-]*)*$/,
4848
PHONE: /^(\()?\d{3}(\))?(-|\s)?\d{3}(-|\s)\d{4}$/,
49-
OPTIONAL: /^.*$/,
49+
OPTIONAL: /\S/,
5050
COMPARISON: /^\s*([LV])\s*([<>]=?|==|!=)\s*([^<>=!]+?)\s*$/
5151
},
5252

0 commit comments

Comments
 (0)