public class BlankAttributeValidator extends Object implements SimpleValidator
Modifier and Type | Field and Description |
---|---|
static String |
CFG_ERROR_MESSAGE |
static String |
CFG_FAIL_ON_NULL |
static String |
ID |
Constructor and Description |
---|
BlankAttributeValidator() |
Modifier and Type | Method and Description |
---|---|
static ValidatorConfig |
createConfig(String errorMessage,
boolean failOnNull)
Create config for this validator to get customized error message
|
String |
getId() |
ValidationContext |
validate(Object input,
String inputHint,
ValidationContext context,
ValidatorConfig config)
Validates the given
input with an additional inputHint and config . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, create, init, postInit
validate, validate, validate, validate, validate, validate
validateConfig
order
public static final String ID
public static final String CFG_ERROR_MESSAGE
public static final String CFG_FAIL_ON_NULL
public String getId()
getId
in interface ProviderFactory<Validator>
public ValidationContext validate(Object input, String inputHint, ValidationContext context, ValidatorConfig config)
Validator
input
with an additional inputHint
and config
.public static ValidatorConfig createConfig(String errorMessage, boolean failOnNull)
errorMessage
- to be used if validation failsfailOnNull
- makes validator fail on null values also (not on empty string only as is the default behavior)Copyright © 2021 JBoss by Red Hat. All rights reserved.