commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bspeak...@apache.org
Subject svn commit: r587279 - /commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/package.html
Date Mon, 22 Oct 2007 22:57:38 GMT
Author: bspeakmon
Date: Mon Oct 22 15:57:37 2007
New Revision: 587279

URL: http://svn.apache.org/viewvc?rev=587279&view=rev
Log:
- VALIDATOR-241: update package.html with InetAddressValidator info

Modified:
    commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/package.html

Modified: commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/package.html
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/package.html?rev=587279&r1=587278&r2=587279&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/package.html
(original)
+++ commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/package.html
Mon Oct 22 15:57:37 2007
@@ -48,6 +48,7 @@
     <li>4.3 <a href="#other.checkdigit">Check Digit Validation/Calculation</a></li>
     <li>4.4 <a href="#other.code">General Code Validation</a></li>
     <li>4.5 <a href="#other.isbn">ISBN Validation</a></li>
+    <li>4.6 <a href="#other.inet">IP Address Validation</a></li>
     </ul></li>
 </ul>
 
@@ -665,5 +666,26 @@
 
 </pre>
 
+<a name="other.inet"></a>
+<h3>4.6 IP Address Validation</h3>
+
+<p>
+    <a href="InetAddressValidator.html">InetAddressValidator</a> provides
+    IPv4 address validation.
+</p>
+<p>
+    For example:
+</p>
+<pre>
+
+      // Get an InetAddressValidator
+      InetAddressValidator validator = InetAddressValidator.getInstance();
+
+      // Validate an IPv4 address
+      if (!validator.isValid(candidateInetAddress)) {
+          ... // invalid
+      }
+
+</pre>
 </body>
 </html>



Mime
View raw message