Hi,
is there is a way to implement validation using JSP block in form using the form variable.
e.g)
Mobile number must be 10 digits
in var1 as text field which takes the mobile number as input
in var2 whether we can use the java script to restrict the var1 for the validation process.
if yes? how can we achieve that ?
You can use field level validation for this.
jsp can contain...
<%
String name = request.getParameter("name");
String question = request.getParameter("question");
String value = request.getParameter("value"); //contains var1 value
if (//logic to check phone number format...) {
out.println("Invalid phone number for " + question + ", expected (###) ###-####");
}
%>
upload jsp under.. Admin -> User Interface -> files.
Once you have uploaded script using the above method, you can reference the script using the uri:
/aveksa/custom/jsp/<your validation form>.jsp