Package com.jbstrap.core.validators
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 TypeMethodDescriptionvalidateData
(Object data, String language) Validates the specified data
-
Method Details
-
validateData
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 validatedlanguage
- The language code of the error message. If not specified, the default language will be used. The default language can be set with theDEFAULT_LANGUAGE
JBStrap parameter.- Returns:
- The specified error message or
null
, if the validation found no errors.
-