blob: 7800751489888d62bb11101776666a6d08b0896b [file] [log] [blame]
<?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.
-->
<document>
<properties>
<title>Commons Validator</title>
</properties>
<body>
<section name="Commons Validator">
<p>
A common issue when receiving data either electronically or from
user input is verifying the integrity of the data. This work is
repetitive and becomes even more complicated when different sets
of validation rules need to be applied to the same set of data based
on locale. Error messages may also vary by locale.
This package addresses some of these issues to
speed development and maintenance of validation rules.
</p>
</section>
<section name="Releases">
<p>See the <a href="downloads.html">Downloads</a> page for current/previous
releases.
For details of whats new in each version see the <a href="changes-report.html">Release Notes</a>.
<a href="http://wiki.apache.org/jakarta-commons/ValidatorReleaseNotes">Community Notes</a> on
release are maintained on the <a href="http://wiki.apache.org/jakarta-commons/">Jakarta Commons Wiki</a>.
</p>
</section>
<section name="Overview">
<subsection name="Features">
<p>Validator provides two distinct sets of functionality:</p>
<ol>
<li>A configurable (typically XML) validation engine</li>
<li>Reusable "primitive" validation methods</li>
</ol>
<p>
Your validation methods are plugged into the engine and
executed against your data. Often, these methods use
resources specific to one application or framework so Commons
Validator doesn't directly provide pluggable validator actions.
However, it does have a set of common validation methods
(email addresses, dates, URLs, etc.) that help in creating
pluggable actions.
</p>
</subsection>
<subsection name="Usage">
<p>
In order to use the Validator, the following basic steps are required:
<ul>
<li>
Create a new instance of the
<code>org.apache.commons.validator.Validator</code> class. Currently
Validator instances may be safely reused if the current
ValidatorResources are the same, as long as you have completed any
previous validation, and you do not try to utilize a particular
Validator instance from more than one thread at a time.
</li>
<li>
Add any resources needed to perform the validations, such as the
JavaBean to validate.
</li>
<li>
Call the validate method on
<code>org.apache.commons.validator.Validator</code>.
</li>
</ul>
</p>
</subsection>
<subsection name="Documentation">
<p>
The package JavaDoc has useful information:
</p>
<ul>
<li><a href="apidocs/org/apache/commons/validator/package-summary.html#package_description">Validator Framework</a></li>
<li><a href="apidocs/org/apache/commons/validator/routines/package-summary.html#package_description">Routines package</a></li>
</ul>
<p>
See the <a href="cvs-usage.html">subversion repository</a> for the latest source code.
</p>
</subsection>
</section>
<section name="Support">
<p>
The <a href="mail-lists.html">commons mailing lists</a> act as the main support forum.
The user list is suitable for most library usage queries.
The dev list is intended for the development discussion.
Please remember that the lists are shared between all commons components,
so prefix your email by [validator].
</p>
<p>
Issues may be reported via <a href="issue-tracking.html">ASF JIRA</a>.
</p>
</section>
</body>
</document>