org.barracudamvc.core.forms.validators
Class ValidTypeValidator

java.lang.Object
  extended byorg.barracudamvc.core.forms.AbstractFormValidator
      extended byorg.barracudamvc.core.forms.DefaultFormValidator
          extended byorg.barracudamvc.core.forms.validators.ValidTypeValidator
All Implemented Interfaces:
FormValidator
Direct Known Subclasses:
FriendlyValidTypeValidator

public class ValidTypeValidator
extends DefaultFormValidator

This validator ensures that the original value constitues a valid type


Field Summary
 
Fields inherited from class org.barracudamvc.core.forms.DefaultFormValidator
localLogger, validators
 
Constructor Summary
ValidTypeValidator()
          Public constructor.
ValidTypeValidator(String ierrorMessage)
          Public constructor.
 
Method Summary
 void validateFormElement(Object val, FormElement element, boolean deferExceptions)
          Validate a FormElement to make sure that the non-null orig values are valid for the specified element type
 
Methods inherited from class org.barracudamvc.core.forms.DefaultFormValidator
addValidator, getValidators, removeValidator, validate, validateForm, validateFormElement
 
Methods inherited from class org.barracudamvc.core.forms.AbstractFormValidator
generateException, getErrorMessage, isNull, setErrorMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidTypeValidator

public ValidTypeValidator()
Public constructor.


ValidTypeValidator

public ValidTypeValidator(String ierrorMessage)
Public constructor.

Parameters:
ierrorMessage - the message associated with this error
Method Detail

validateFormElement

public void validateFormElement(Object val,
                                FormElement element,
                                boolean deferExceptions)
                         throws ValidationException
Validate a FormElement to make sure that the non-null orig values are valid for the specified element type

Overrides:
validateFormElement in class DefaultFormValidator
Parameters:
val - the value to compare the element value to
element - the form element that contains the val to validate elements by comparing them with other elements)
deferExceptions - do we want to deferValidation exceptions and attempt to validate all elements so that we can process all the exceptions at once
Throws:
ValidationException - if the element is not valid


Copyright © 2004 BarracudaMVC.org All Rights Reserved.