Skip to content

Instantly share code, notes, and snippets.

@ggkrustev
Last active August 29, 2015 13:56
Show Gist options
  • Save ggkrustev/9211907 to your computer and use it in GitHub Desktop.
Save ggkrustev/9211907 to your computer and use it in GitHub Desktop.
A simple test for creating custom mask rules in JSP
<%
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