0
<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>

我有 Url 验证器正则表达式是"(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?" 以下在 JavaScript 中工作但在 JSF 中不工作

4

0 回答 0