Edit Validate rules
Format
- Ex:
638701
1
2
3
4
5
6
7
8
9
10
11
12
13
// regex to check Phone
String regex = ("^[1-9]{1}[0-9]{5}$");
// Compile the ReGex
java.util.regex.Pattern p=java.util.regex.Pattern.compile(regex);
// If the string is empty, return false
if (theValue == null || theValue.trim().equals("")) return false;
theProperty.addMessage("Please enter valid Pin Code");
// Pattern class contains matches() method to match the given string and regular expression
java.util.regex.Matcher m = p.matcher(theValue);
return m.matches();
Reference
Click Here - More details from pega academy for Edit Validate rules
Comments powered by Disqus.