Package org.keycloak.validate
Class ValidationError
- java.lang.Object
- 
- org.keycloak.validate.ValidationError
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class ValidationError extends Object implements Serializable Denotes an error found during validation.- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringMESSAGE_INVALID_VALUEA generic invalid value message.
 - 
Constructor SummaryConstructors Constructor Description ValidationError(String validatorId, String inputHint, String message)ValidationError(String validatorId, String inputHint, String message, Object... messageParameters)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringformatMessage(BiFunction<String,Object[],String> formatter)Formats the currentValidationErrorwith the given formatterFunction.StringgetInputHint()Object[]getInputHintWithMessageParameters()Returns an array where the first element is theinputHintfollwed by themessageParameters.StringgetMessage()Object[]getMessageParameters()Returns the raw message parameters, e.g.javax.ws.rs.core.Response.StatusgetStatusCode()StringgetValidatorId()inthashCode()ValidationErrorsetStatusCode(javax.ws.rs.core.Response.Status statusCode)StringtoString()
 
- 
- 
- 
Field Detail- 
MESSAGE_INVALID_VALUEpublic static final String MESSAGE_INVALID_VALUE A generic invalid value message.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getValidatorIdpublic String getValidatorId() 
 - 
getInputHintpublic String getInputHint() 
 - 
getMessagepublic String getMessage() 
 - 
getMessageParameterspublic Object[] getMessageParameters() Returns the raw message parameters, e.g. the actual input that was given for validation.- Returns:
- See Also:
- getInputHintWithMessageParameters()
 
 - 
formatMessagepublic String formatMessage(BiFunction<String,Object[],String> formatter) Formats the currentValidationErrorwith the given formatterFunction.The formatter Functionwill be called with themessageandgetInputHintWithMessageParameters()to render the error message.- Parameters:
- formatter-
- Returns:
 
 - 
getInputHintWithMessageParameterspublic Object[] getInputHintWithMessageParameters() Returns an array where the first element is theinputHintfollwed by themessageParameters.- Returns:
 
 - 
setStatusCodepublic ValidationError setStatusCode(javax.ws.rs.core.Response.Status statusCode) 
 - 
getStatusCodepublic javax.ws.rs.core.Response.Status getStatusCode() 
 
- 
 
-