Browse Source

Fixes bracket match in rule function

When adding a custom method e.g. "isValid[\[0-9A-Za-z\]+]" using form validation module, I found it got the wrong match "[0-9A-Za-z" as the regular expression, so I prefer using greedy match.
pull/658/head
icefox0801 11 years ago
parent
commit
179cdb43a4
1 changed files with 1 additions and 1 deletions
  1. 2
      src/modules/behavior/form.js

2
src/modules/behavior/form.js

@ -403,7 +403,7 @@ $.fn.form = function(fields, parameters) {
type = validation.type,
value = $.trim($field.val() + ''),
bracketRegExp = /\[(.*?)\]/i,
bracketRegExp = /\[(.*)\]/i,
bracket = bracketRegExp.exec(type),
isValid = true,
ancillary,

Loading…
Cancel
Save