Class DurationFormat
java.lang.Object
com.networknt.schema.format.DurationFormat
- All Implemented Interfaces:
Format
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the message key to use for the message.getName()Gets the format name.protected booleanisStrictValidation(ValidationContext validationContext) booleanmatches(ExecutionContext executionContext, ValidationContext validationContext, String duration) Determines if the value matches the format.
-
Field Details
-
DURATION
- See Also:
-
STRICT
-
LAX
-
-
Constructor Details
-
DurationFormat
public DurationFormat()
-
-
Method Details
-
matches
public boolean matches(ExecutionContext executionContext, ValidationContext validationContext, String duration) Description copied from interface:FormatDetermines if the value matches the format. -
isStrictValidation
-
getName
-
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 instance location
{1} The format name
{2} The error message description
{3} The input value- Specified by:
getMessageKeyin interfaceFormat- Returns:
- the message key
-