public final class HostnameFormatAttribute extends FormatAttribute
host-name format specification
Note: even though the RFCs covering hostnames do not require that
hostnames have a domain part, this implementation requires that they have
one by default (this is more in line with user expectations). You can enforce
strict RFC compliance by setting the ValidationFeature.STRICT_RFC_CONFORMANCE validation feature before building
your schema factory.
Guava's InternetDomainName is used for validation.
ValidationFeature| Modifier and Type | Method and Description |
|---|---|
void |
checkValue(String fmt,
ValidationContext ctx,
ValidationReport report,
JsonNode value)
Abstract method implemented by all attributes
|
static FormatAttribute |
getInstance() |
newMsg, validatepublic static FormatAttribute getInstance()
public void checkValue(String fmt, ValidationContext ctx, ValidationReport report, JsonNode value)
FormatAttributeIt is only called if the value type is one expected by the
attribute, see FormatAttribute.validate(String, ValidationContext,
ValidationReport, JsonNode).
checkValue in class FormatAttributefmt - the format attribute namectx - the validation contextreport - the validation reportvalue - the value to validateCopyright © 2012. All Rights Reserved.