Class YymmddHhValidator
java.lang.Object
tools.pantheum.gaia.gs1.content.componentformat.YymmddHhValidator
- All Implemented Interfaces:
ComponentFormatInterface
Validates
yymmddhh — a YYMMDDHH date-and-hour value used in AI 8008 (PROD TIME).
Rules:
- Length must be exactly 8
- First 6 digits (YYMMDD): validated as a strict calendar date via
YymmddValidator - Last 2 digits (HH): hour in range 00–23
-
Field Summary
Fields -
Method Summary
-
Field Details
-
INSTANCE
The singleton instance.
-
-
Method Details
-
validate
public List<GaiaError> validate(String s, String ai, int position, String component, String format, GaiaConstants.Language language) Description copied from interface:ComponentFormatInterfaceValidatesvalueagainst this format's rules and returns the resulting errors, or an empty list when valid (oneGaiaErrorper failing condition).- Specified by:
validatein interfaceComponentFormatInterface- Parameters:
s- the component slice to validate (charset already verified)ai- the Application Identifier of the enclosing elementposition- the character position of the element in the inputcomponent- the component's data titleformat- the component's format keylanguage- the language in which to produce the error messages- Returns:
- the validate.
-