Skip to content

Commit 003b556

Browse files
kelexelSergioCrisostomo
authored andcommitted
Update Form.Validator.Extras.js
Fix validate-match "matchName" not "working" if containing spaces
1 parent 8ce4ade commit 003b556

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/Forms/Form.Validator.Extras.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Form.Validator.addAllThese([
148148

149149
['validate-match', {
150150
errorMsg: function(element, props){
151-
return Form.Validator.getMsg('match').substitute({matchName: props.matchName || document.id(props.matchInput).get('name')});
151+
return Form.Validator.getMsg('match').substitute({matchName: decodeURIComponent((props.matchName+'').replace(/\+/g, '%20')) || document.id(props.matchInput).get('name')});
152152
},
153153
test: function(element, props){
154154
var eleVal = element.get('value');

0 commit comments

Comments
 (0)