anchor.diff:                              if (validateEmpty("<%=userFields[i].getClaimUri()%>").length > 0) {
                                   CARBON.showWarningDialog("<%=Encode.forJavaScript(Encode.forHtml(userFields[i].
                                                              getDisplayName()))%>" + " <fmt:message key='is.required'/>");
  -                                return false;
  -                            }
  -                        <%}
  -                          if(userFields[i].getRegEx() != null){ %>
  -                            var reg = new RegExp("<%=Encode.forJavaScript(userFields[i].getRegEx())%>");
  -                            var valid = reg.test(value);
  -                            if (value != '' && !valid) {
  -                                CARBON.showWarningDialog("<%=Encode.forJavaScript(Encode.forHtml(userFields[i].
  +                        return false;
  +                    }
  +                    <%}
  +                      if(userFields[i].getRegEx() != null){ %>
  +                    var reg = new RegExp("<%=Encode.forJavaScript(userFields[i].getRegEx())%>");
  +                    var valid = reg.test(value);
  +                    if (value != '' && !valid) {
  +                        CARBON.showWarningDialog("<%=Encode.forJavaScript(Encode.forHtml(userFields[i].
                                                             getDisplayName()))%>" + " <fmt:message key='is.not.valid'/>");
                                   return false;
                               }
  
positive.code:                     }
                  }
                  %>
  
  	                var unsafeCharPattern = /[<>`\"]/;
  	                var elements = document.getElementsByTagName("input");
  	                for(i = 0; i < elements.length; i++){
  	                    if((elements[i].type === 'text' || elements[i].type === 'password') &&
  	                       elements[i].value != null && elements[i].value.match(unsafeCharPattern) != null){
  	                        CARBON.showWarningDialog("<fmt:message key="unsafe.char.validation.msg"/>");
  	                        return false;
  
negative.code:         <%
              if ("true".equals(fromUserMgt)) {
          %>
          <%
              if (!readOnlyUserStore) {
          %>
          <h2><fmt:message key='update.profile1'/><%=Encode.forHtml(username)%>
          </h2>
          <%
          } else {
          %>
          <h2><fmt:message key='view.profile1'/><%=Encode.forHtml(username)%>
          </h2>
          <%
              }
          } else {
          %>
          <%
              if (!readOnlyUserStore) {
          %>
          <h2><fmt:message key='update.profile'/></h2>
          <%
          } else {
          %>
          <h2><fmt:message key='view.profile'/></h2>
          <%
                  }
              }
          %>
          <div id="workArea">
              <script type="text/javascript">
                  function validate() {
  