Server-side validation using Edit Validate rules
Let's start with a short tutorial to see how server-side validation works using Edit Validate rules. Create the MobilePhone Edit Validate rule with the following Java Source: // ************************** // // Edit Validate: MobilePhone // // ************************** // java.util.regex.Pattern regex = java.util.regex.Pattern.compile("^[0-9]{9}$", java.util.regex.Pattern.CASE_INSENSITIVE); java.util.regex.Matcher matcher = regex.matcher(theValue); if (!matcher.find()) { theProperty.addMessage("[server] The phone is invalid"); return false; } return true; Create the .Phone property and set its "Use validate" option to MobilePhone . Create the EmailAddress Edit Validate rule with the following Java Source: // *************************** // // Edit Validate: EmailAddress // // *************************** // java.util.regex.Pattern regex = java.util.regex.Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", java....