×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: XML
Posted by: Ritik Kumar
Added: Apr 25, 2021 10:30 AM
Views: 3971
Tags: no tags
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2.  
  3. <!--
  4.  
  5.    Licensed to the Apache Software Foundation (ASF) under one
  6.    or more contributor license agreements.  See the NOTICE file
  7.    distributed with this work for additional information
  8.    regarding copyright ownership.  The ASF licenses this file
  9.    to you under the Apache License, Version 2.0 (the
  10.    "License"); you may not use this file except in compliance
  11.    with the License.  You may obtain a copy of the License at
  12.  
  13.      http://www.apache.org/licenses/LICENSE-2.0
  14.  
  15.    Unless required by applicable law or agreed to in writing,
  16.    software distributed under the License is distributed on an
  17.    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  18.    KIND, either express or implied.  See the License for the
  19.    specific language governing permissions and limitations
  20.    under the License.
  21.  
  22. -->
  23.  
  24. <!DOCTYPE form-validation PUBLIC
  25.          "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
  26.          "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
  27.  
  28. <form-validation>
  29.  
  30. <!--
  31.     This is a minimal Validator form file with a couple of examples.
  32. -->
  33.  
  34.     <global>
  35.  
  36.         <!-- An example global constant
  37.        <constant>
  38.            <constant-name>postalCode</constant-name>
  39.            <constant-value>^\d{5}\d*$</constant-value>
  40.        </constant>
  41.        end example-->
  42.  
  43.     </global>
  44.  
  45.     <formset>
  46.  
  47.         <!-- An example form -->
  48.         <form name="logonForm">
  49.             <field
  50.                property="username"
  51.                depends="required">
  52.                     <arg key="logonForm.username"/>
  53.             </field>
  54.             <field
  55.                property="password"
  56.                depends="required,mask">
  57.                     <arg key="logonForm.password"/>
  58.                     <var>
  59.                         <var-name>mask</var-name>
  60.                         <var-value>^[0-9a-zA-Z]*$</var-value>
  61.                     </var>
  62.             </field>
  63.         </form>
  64.  
  65.     </formset>
  66.  
  67.     <!-- An example formset for another locale -->
  68.     <formset language="fr">
  69.  
  70.         <constant>
  71.             <constant-name>postalCode</constant-name>
  72.             <constant-value>^[0-9a-zA-Z]*$</constant-value>
  73.         </constant>
  74.  
  75.         <!-- An example form -->
  76.         <form name="logonForm">
  77.             <field
  78.                property="username"
  79.                depends="required">
  80.                     <arg key="logonForm.username"/>
  81.             </field>
  82.             <field
  83.                property="password"
  84.                depends="required,mask">
  85.                     <arg key="logonForm.password"/>
  86.                     <var>
  87.                         <var-name>mask</var-name>
  88.                         <var-value>^[0-9a-zA-Z]*$</var-value>
  89.                     </var>
  90.             </field>
  91.         </form>
  92.  
  93.    </formset>
  94.  
  95. </form-validation>
  96.