Interface DataValidator

All Known Subinterfaces:
DataRangeValidator
All Known Implementing Classes:
BooleanValidator, DateValidator, FloatValidator, IntegerRangeValidator, IntegerValidator, LongValidator, NullValidator

public interface DataValidator
Date validator interface
Since:
4.0
Author:
JBStrap
  • Method Summary

    Modifier and Type
    Method
    Description
    validateData(Object data, String language)
    Validates the specified data
  • Method Details

    • validateData

      String validateData(Object data, String language)

      Validates the specified data

      The validation implementation must return a string if it encounters an error. This string has to contain the error message that will be seen by the user. If the validation was successful, the method must return a null value, meaning that no error was found.

      Parameters:
      data - The data to be validated
      language - The language code of the error message. If not specified, the default language will be used. The default language can be set with the DEFAULT_LANGUAGE JBStrap parameter.
      Returns:
      The specified error message or null, if the validation found no errors.