Class MaxLengthValidator
java.lang.Object
games.stendhal.server.core.account.MaxLengthValidator
- All Implemented Interfaces:
AccountParameterValidator
validates that the given parameter is provided is short than a specified
maximum length.
- Author:
- hendrik
-
Constructor Summary
ConstructorDescriptionMaxLengthValidator(String parameterValue, int maxLength)
creates a new MaxLengthValidator. -
Method Summary
-
Constructor Details
-
MaxLengthValidator
creates a new MaxLengthValidator.- Parameters:
parameterValue
- value to validatemaxLength
- maximum required length
-
-
Method Details
-
validate
Description copied from interface:AccountParameterValidator
validates a parameter provided for account creation.- Specified by:
validate
in interfaceAccountParameterValidator
- Returns:
null
in case the parameter is valid, or an error otherwise
-