Class LongValidator

java.lang.Object
com.jbstrap.core.validators.LongValidator
All Implemented Interfaces:
DataValidator

public class LongValidator extends Object implements DataValidator
The long validator class
Since:
4.0
Author:
JBStrap
  • Constructor Details

    • LongValidator

      public LongValidator()
  • Method Details

    • validateData

      public String validateData(Object data, String language)

      Validates the specified value

      The specified value will be validated, if it can be converted into a Long type

      The error message, returned by the method can be customized or have its language set in the validator.longValidatorError properties file with the use of a key. For more information about language settings, see the MessageSourceAPI class

      Specified by:
      validateData in interface DataValidator
      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.