Note that this constraint assumes you want to validate input which represents a body fragment of an HTML document. If
you instead want to validate input which represents a complete HTML document, add the html, head and
body tags to the used whitelist as required.
| Modifier and Type | Optional Element and Description |
|---|---|
String[] |
additionalTags |
SafeHtml.Tag[] |
additionalTagsWithAttributes |
Class<?>[] |
groups |
String |
message |
Class<? extends javax.validation.Payload>[] |
payload |
SafeHtml.WhiteListType |
whitelistType |
public abstract String message
public abstract Class<?>[] groups
public abstract Class<? extends javax.validation.Payload>[] payload
public abstract SafeHtml.WhiteListType whitelistType
public abstract String[] additionalTags
whitelistType().public abstract SafeHtml.Tag[] additionalTagsWithAttributes
Copyright © 2009-2015 Oracle Corporation. All Rights Reserved.