public class DurationValidator extends BaseJsonValidator implements JsonValidator
This class provides methods to validate a duration format .
applyDefaultsStrategy, failFast, parentSchema, schemaNode, schemaPath, validationContext
AT_ROOT
Constructor and Description |
---|
DurationValidator(String schemaPath,
com.fasterxml.jackson.databind.JsonNode schemaNode,
JsonSchema parentSchema,
ValidationContext validationContext,
String formatName) |
Modifier and Type | Method and Description |
---|---|
boolean |
isValid(String duration)
Checks if a field has a valid duration.
|
Set<ValidationMessage> |
validate(com.fasterxml.jackson.databind.JsonNode node,
com.fasterxml.jackson.databind.JsonNode rootNode,
String at)
Validate the given JsonNode, the given node is the child node of the root node at given
data path.
|
buildValidationMessage, checkDiscriminatorMatch, debug, equals, fetchSubSchemaNode, getNodeFieldType, getParentSchema, getSchemaNode, getSchemaPath, getValidatorType, greaterThan, isPartOfOneOfMultipleType, lessThan, parseErrorCode, preloadJsonSchemas, registerAndMergeDiscriminator, validate, walk
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
preloadJsonSchema, validate
walk
public DurationValidator(String schemaPath, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema, ValidationContext validationContext, String formatName)
public boolean isValid(String duration)
Checks if a field has a valid duration.
duration
- The value validation is being performed on. A null
value is considered invalid.public Set<ValidationMessage> validate(com.fasterxml.jackson.databind.JsonNode node, com.fasterxml.jackson.databind.JsonNode rootNode, String at)
JsonValidator
validate
in interface JsonValidator
node
- JsonNoderootNode
- JsonNodeat
- StringCopyright © 2022. All rights reserved.