Class TemporalFormatValidator

java.lang.Object
org.everit.json.schema.internal.TemporalFormatValidator
All Implemented Interfaces:
FormatValidator
Direct Known Subclasses:
DateFormatValidator, TimeFormatValidator

public class TemporalFormatValidator extends Object implements FormatValidator
Base class for date and time format validators
  • Method Details

    • validate

      public Optional<String> validate(String subject)
      Description copied from interface: FormatValidator
      Implementation-specific validation of subject. If a validation error occurs then implementations should return a programmer-friendly error message as a String wrapped in an Optional. If the validation succeeded then an empty optional should be returned.
      Specified by:
      validate in interface FormatValidator
      Parameters:
      subject - the string to be validated
      Returns:
      an Optional wrapping the error message if a validation error occured, otherwise an empty optional.