ninja.validation
Interface Validator<T>

All Known Implementing Classes:
Validators.FloatValidator, Validators.IntegerValidator, Validators.LengthValidator, Validators.MatchesValidator, Validators.NumberValidator, Validators.RequiredValidator

public interface Validator<T>

A validator for validating parameters

Author:
James Roper

Method Summary
 Class<T> getValidatedType()
          Get the type that this validator validates
 void validate(T value, String field, Validation validation)
          Validate the given value
 

Method Detail

validate

void validate(T value,
              String field,
              Validation validation)
Validate the given value

Parameters:
value - The value, may be null
field - The name of the field being validated, if applicable
validation - The validation context

getValidatedType

Class<T> getValidatedType()
Get the type that this validator validates

Returns:
The type that the validator validates


Copyright © 2012. All Rights Reserved.