Class DateValidator

java.lang.Object
org.javalite.validation.ValidatorAdapter
org.javalite.validation.DateValidator
All Implemented Interfaces:
Validator

public class DateValidator extends ValidatorAdapter
If you are looking conversion, use DateToStringConverter.
Author:
Igor Polevoy
  • Constructor Details

    • DateValidator

      public DateValidator(String attributeName, String format)
  • Method Details

    • validate

      public void validate(Validatable validatable)
      Description copied from interface: Validator
      Called by framework when validation is required
      Parameters:
      validatable - map being validated.
    • formatMessage

      public String formatMessage(Locale locale, Object... params)
      Description copied from class: ValidatorAdapter
      Provides default implementation, will look for a property in resource bundle, using set message as key. If property in resource bundle not found, treats message verbatim.
      Specified by:
      formatMessage in interface Validator
      Overrides:
      formatMessage in class ValidatorAdapter
      Parameters:
      locale - locale to use, or null for default locale.
      params - parameters in case a message is parametrized.
      Returns:
      formatted message.