org.hibernate.validator.constraints
Annotation Type SafeHtml
@Documented
@Constraint(validatedBy=SafeHtmlValidator.class)
@Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER})
@Retention(value=RUNTIME)
public @interface SafeHtml
Validate a rich text value provided by the user to ensure that it contains no malicious code, such as embedded
<script> elements.
- Author:
- George Gastaldi
message
public abstract String message
- Default:
- "{org.hibernate.validator.constraints.SafeHtml.message}"
groups
public abstract Class<?>[] groups
- Default:
- {}
payload
public abstract Class<? extends Payload>[] payload
- Default:
- {}
whitelistType
public abstract SafeHtml.WhiteListType whitelistType
- Returns:
- The built-in whitelist type which will be applied to the rich text value
- Default:
- org.hibernate.validator.constraints.SafeHtml.WhiteListType.RELAXED
additionalTags
public abstract String[] additionalTags
- Returns:
- Additional whitelist tags which are allowed on top of the tags specified by the
whitelistType()
.
- Default:
- {}
Copyright © 2007-2011 Red Hat Middleware, LLC. All Rights Reserved