Package com.networknt.schema.format
Class DurationFormat
- java.lang.Object
-
- com.networknt.schema.format.DurationFormat
-
-
Constructor Summary
Constructors Constructor Description DurationFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMessageKey()Gets the message key to use for the message.StringgetName()Gets the format name.protected booleanisStrictValidation(SchemaContext schemaContext)booleanmatches(ExecutionContext executionContext, SchemaContext schemaContext, String duration)Determines if the value matches the format.
-
-
-
Method Detail
-
matches
public boolean matches(ExecutionContext executionContext, SchemaContext schemaContext, String duration)
Description copied from interface:FormatDetermines if the value matches the format.
-
isStrictValidation
protected boolean isStrictValidation(SchemaContext schemaContext)
-
getMessageKey
public String getMessageKey()
Description copied from interface:FormatGets the message key to use for the message.See jsv-messages.properties.
The following are the arguments.
{0} The format name
{1} The input valueNote that the default localized messages do not use the input value.
- Specified by:
getMessageKeyin interfaceFormat- Returns:
- the message key
-
-