Class FloatValidator

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

public class FloatValidator extends Object implements DataValidator
Float validator class
Since:
4.0
Author:
JBStrap
  • Constructor Details

    • FloatValidator

      public FloatValidator()
  • Method Details

    • validateData

      public String validateData(Object data, String language)

      Validates the specified data

      The data is validated, if it can be converted into Float

      The error message can be customized with the validator.floatValidatorError properties file key. This is also used to implement language specific error messages. For more information about language specific messages, see: MessageSourceAPI

      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.