META-INF.maven-faces-plugin.validators.trinidad.RegExp.xml Maven / Gradle / Ivy
<?xml version="1.0" ?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:tr="http://myfaces.apache.org/trinidad" xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin" xmlns:fmd="http://java.sun.com/xml/ns/javaee/faces/design-time-metadata"> <validator> <description><![CDATA[Validate expression using Java regular expression syntax. If you want to match a metacharacter in a pattern, escape it with \\. E.g. to match [ your regular expression pattern would be \\[.]]></description> <display-name>validateRegularExpression</display-name> <validator-id>org.apache.myfaces.trinidad.RegExp</validator-id> <validator-class>org.apache.myfaces.trinidadinternal.validator.RegExpValidator</validator-class> <property> <description><![CDATA[Whether the converter should be disabled, default to false.]]> </description> <property-name>disabled</property-name> <property-class>boolean</property-class> <default-value>false</default-value> </property> <property> <description><![CDATA[pattern to be matched in the input value.]]></description> <property-name>pattern</property-name> <property-class>java.lang.String</property-class> <property-extension> <mfp:property-metadata/> <fmd:property-metadata> <fmd:preferred>true</fmd:preferred> </fmd:property-metadata> </property-extension> </property> <property> <description><![CDATA[<p> Custom error message to be used, for creating detail part of faces message, when users input does not match the specified pattern. </p> <p> <strong> Parameters: </strong> <ul> <li> {0} the label that identifies the component </li> <li> {1} value entered by the user </li> <li> {2} represents the 'pattern' expected in the input </li> </ul> </p>]]> </description> <property-name>messageDetailNoMatch</property-name> <property-class>java.lang.String</property-class> <property-extension> <mfp:property-metadata> <mfp:translatable>true</mfp:translatable> </mfp:property-metadata> </property-extension> </property> <validator-extension> <mfp:tag-name>tr:validateRegExp</mfp:tag-name> <mfp:tag-class>org.apache.myfaces.trinidadinternal.taglib.validator.ValidateRegExpTag</mfp:tag-class> <mfp:long-description><![CDATA[Validate expression using java regular expression syntax.]]></mfp:long-description> <mfp:example> <mfp:source-code><![CDATA[<tr:inputText value="9999" label="RegExp validation"> <tr:validateRegExp pattern="[9]*"/> </tr:inputText>]]> </mfp:source-code> </mfp:example> <mfp:author>Blake Sullivan</mfp:author> <mfp:validator-metadata> <mfp:favorite-property>pattern</mfp:favorite-property> </mfp:validator-metadata> </validator-extension> </validator> </faces-config>