How to Write following JS regular expression in JSF

99 Views Asked by At
<h:outputText value=""/>
<h:panelGroup>
<h:outputText value="State &amp; City Geolocation URL "/>
<h:inputText id="URL" value="#{geolocationBean.geolocationURL}" required="true">
<f:validator validatorId="urlValidator"/>
    <f:validateRegex pattern="(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?" />
</h:inputText>
<h:message style="color:red" for="URL"/>
</h:panelGroup>

I have Url validator regular expression is "(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?" The following is working in JavaScript but not working in JSF

0

There are 0 best solutions below