T - value typepublic abstract class AbstractValidator<T> extends java.lang.Object implements Validator<T>
| Modifier and Type | Field and Description |
|---|---|
protected io.jmix.core.security.CurrentAuthentication |
currentAuthentication |
protected io.jmix.core.metamodel.datatype.DatatypeRegistry |
datatypeRegistry |
protected java.lang.String |
message |
protected io.jmix.core.Messages |
messages |
protected StringSubstitutor |
substitutor |
| Constructor and Description |
|---|
AbstractValidator() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
formatValue(java.lang.Object value) |
java.lang.String |
getMessage() |
protected java.lang.String |
getTemplateErrorMessage(java.lang.String errorMessage,
java.util.Map<java.lang.String,java.lang.Object> valuesMap) |
void |
setMessage(java.lang.String message)
Sets custom error message that will be used instead of default message.
|
protected io.jmix.core.Messages messages
protected io.jmix.core.security.CurrentAuthentication currentAuthentication
protected io.jmix.core.metamodel.datatype.DatatypeRegistry datatypeRegistry
protected StringSubstitutor substitutor
protected java.lang.String message
@Nullable public java.lang.String getMessage()
@StudioProperty(type=LOCALIZED_STRING) public void setMessage(@Nullable java.lang.String message)
message - error messageprotected java.lang.String getTemplateErrorMessage(@Nullable
java.lang.String errorMessage,
java.util.Map<java.lang.String,java.lang.Object> valuesMap)
errorMessage - error messagevaluesMap - values mapprotected java.lang.String formatValue(java.lang.Object value)