0
if (values[0] != null && !values[0].equals("")) {

        // string regex="^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$";

        else if(!Pattern.matches("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$",values[0])) { 
            String id = FormUtil.getElementParameterName(element);
            formData.addFormError(id, "Same Email Id matches L2!!!!");
            result = false;
        }
    } 

In the above code I tried giving an email regex validator in Joget "Bean Shell Validator". But the code seems to have some problem/mistake due to which the desired output is not achieved. I want to throw an error if the entered email do not match the email regex!!

Sasikumar Murugesan
  • 4,412
  • 10
  • 51
  • 74
Punam
  • 11
  • 2

0 Answers0