Last active
August 29, 2015 13:56
-
-
Save ggkrustev/9211907 to your computer and use it in GitHub Desktop.
A simple test for creating custom mask rules in JSP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
Map<String,Object> map = new HashMap<String,Object>(); | |
String rule = "/[+-]/"; | |
map.put("~", new Function(rule)); | |
String rule2 = "function (char) {" + | |
"return char ==='*';" + | |
"}"; | |
map.put("%", new Function(rule2)); | |
%> | |
<kendo:maskedTextBox name="phone_number" mask="(999) 000-0000" value="555 123 4567" rules="<%=map%>"></kendo:maskedTextBox> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment