Package org.keycloak.validate
Class ValidationError
java.lang.Object
org.keycloak.validate.ValidationError
- All Implemented Interfaces:
Serializable
Denotes an error found during validation.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionValidationError
(String validatorId, String inputHint, String message) ValidationError
(String validatorId, String inputHint, String message, Object... messageParameters) -
Method Summary
Modifier and TypeMethodDescriptionboolean
formatMessage
(BiFunction<String, Object[], String> formatter) Formats the currentValidationError
with the given formatterFunction
.Object[]
Returns an array where the first element is theinputHint
follwed by themessageParameters
.Object[]
Returns the raw message parameters, e.g.jakarta.ws.rs.core.Response.Status
int
hashCode()
setStatusCode
(jakarta.ws.rs.core.Response.Status statusCode) toString()
-
Field Details
-
MESSAGE_INVALID_VALUE
A generic invalid value message.- See Also:
-
-
Constructor Details
-
ValidationError
-
ValidationError
-
-
Method Details
-
getValidatorId
-
getInputHint
-
getMessage
-
getMessageParameters
Returns the raw message parameters, e.g. the actual input that was given for validation.- Returns:
- See Also:
-
formatMessage
Formats the currentValidationError
with the given formatterFunction
.The formatter
Function
will be called with themessage
andgetInputHintWithMessageParameters()
to render the error message.- Parameters:
formatter
-- Returns:
-
getInputHintWithMessageParameters
Returns an array where the first element is theinputHint
follwed by themessageParameters
.- Returns:
-
equals
-
hashCode
public int hashCode() -
toString
-
setStatusCode
-
getStatusCode
public jakarta.ws.rs.core.Response.Status getStatusCode()
-