Package com.identity4j.util.validator
Class ValidationError
- java.lang.Object
-
- com.identity4j.util.validator.ValidationError
-
- All Implemented Interfaces:
Serializable
public class ValidationError extends Object implements Serializable
Represents a localised error that occurred during field validation.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringRESOURCE_BUNDLE_VALIDATORValidator message bundle name
-
Constructor Summary
Constructors Constructor Description ValidationError(String message, ValidationContext context, Object... args)Constructor.ValidationError(String bundleName, ValidationContext context, String messageKey, Object[] args)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]getArgs()Get the arguments to use in message replacement for this error.StringgetBundle()Get the resource bundle name that contains the resources for this error.ValidationContextgetContext()Get the context this validation error was created in.StringgetMessage()Get the message key to use for this validation error.StringtoString()
-
-
-
Field Detail
-
RESOURCE_BUNDLE_VALIDATOR
public static String RESOURCE_BUNDLE_VALIDATOR
Validator message bundle name
-
-
Constructor Detail
-
ValidationError
public ValidationError(String message, ValidationContext context, Object... args)
Constructor.- Parameters:
message- messageargs- arguments
-
ValidationError
public ValidationError(String bundleName, ValidationContext context, String messageKey, Object[] args)
Constructor.- Parameters:
bundleName- bundle namemessageKey- messageargs-
-
-
Method Detail
-
getContext
public final ValidationContext getContext()
Get the context this validation error was created in.- Returns:
- field
-
getBundle
public final String getBundle()
Get the resource bundle name that contains the resources for this error.- Returns:
- resource bundle name
-
getMessage
public final String getMessage()
Get the message key to use for this validation error.- Returns:
- message key
-
getArgs
public final Object[] getArgs()
Get the arguments to use in message replacement for this error.- Returns:
- arguments
-
-