
ShlomoKatz (Customer) to rsaSFDCadmin (RSA): asked a question.
Javascript block in form to validate minimum characters
I need to created a validation method to ensure there is at least 6 characters
in a form field.
I can use a javascript block, however, I am not familiar with the appropriate
string to use for VAR Result (if that is correct to start with).
Any ideas to meet this requirement?
7.2 P5
Thank you
in a form field.
I can use a javascript block, however, I am not familiar with the appropriate
string to use for VAR Result (if that is correct to start with).
Any ideas to meet this requirement?
7.2 P5
Thank you
id/5790) Thank you, I have learned a lot.
Can you please tell me how to modify the code from the example to check for at
least 5 characters.
Example: we have a requirement to have a phone number in the form. Since this
feeds to Auzre MFA, it needs to be in a string format of +1 and then a space,
so +1 212-555-1212.
The +1 is hard coded as they have an option to change the country code as
well through a drop down.
<%@ page import="java.io.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.util.regex.*"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
String name = request.getParameter("name");
String question = request.getParameter("question");
String value = request.getParameter("value");
if (value == null || !value.matches("^.+@.+\\\\..+$")) {
out.println("Your email " + value + " is invalid." + " Please use the
@domain.com value");
}
%>
Thank you