Package com.jbstrap.core.validators
Class BooleanValidator
java.lang.Object
com.jbstrap.core.validators.BooleanValidator
- All Implemented Interfaces:
DataValidator
The Boolean validator class
- Since:
- 4.0
- Author:
- JBStrap
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
BooleanValidator
public BooleanValidator()
-
-
Method Details
-
validateData
Boolean validator
The specified data is validated, if it's a boolean value, or can be converted into one
The error message, returned by the method can be customized or have its language set in the
validator.booleanValidatorError
properties file with the use of a key. For more information about language settings, see theMessageSourceAPI
class- Specified by:
validateData
in interfaceDataValidator
- 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.
-