Skip to content

Commit

Permalink
UI-994: Add regex rule for the validation
Browse files Browse the repository at this point in the history
  • Loading branch information
joristirado authored and mroux committed Feb 10, 2015
1 parent a4a8bb1 commit 68a060d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/lib/monster.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,11 @@ define(function(require){
else return true;
}, localization.customRules['checkList']);

// Adding advanced custom rules
$.validator.addMethod('regex', function(value, element, regexpr) {
return regexpr.test(value);
});

this.customValidationInitialized = true;
},

Expand Down

0 comments on commit 68a060d

Please sign in to comment.