com.townleyenterprises.validator
Interface FieldValidator

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
IntRangeValidator

public interface FieldValidator
extends java.io.Serializable

This interface defines the generic capabilities of a form field validation operation. It is essentially a function object which can optionally mutate the value being validated.

Since:
3.0
Version:
$Id: FieldValidator.java,v 1.3 2004/08/11 16:22:11 atownley Exp $
Author:
Andrew S. Townley

Method Summary
 void validate(java.lang.Object value)
          This method validates the given value based on the implementation-defined validation rules.
 void validate(java.lang.Object value, java.util.Locale locale)
          This method validates the given value based on the implementation-defined validation rules and the specified locale.
 

Method Detail

validate

public void validate(java.lang.Object value)
              throws java.lang.Exception
This method validates the given value based on the implementation-defined validation rules.

Throws:
java.lang.Exception - if the validation fails

validate

public void validate(java.lang.Object value,
                     java.util.Locale locale)
              throws java.lang.Exception
This method validates the given value based on the implementation-defined validation rules and the specified locale.

Throws:
java.lang.Exception - if the validation fails


Copyright © 2002-2004, Andrew S. Townley and Townley Enterprises. All Rights Reserved.
This project is hosted on http://te-code.sourceforge.net.