V
- The type of value to be validatedpublic final class ConstraintComposition<V> extends ConstraintAggregation<V>
ConstraintAggregation
implementation that
is composition of the encapsulated constraints.
This class differs from the ConstraintConjunction
in that it
returns error message composed from messages of the encapsulated constraints
(each message in a new line).
constraints, type
Modifier and Type | Method and Description |
---|---|
boolean |
appendMessageArguments(ValidationContext<?> context,
Map<String,Object> arguments)
Returns
false . |
String |
getMessageTemplate(ValidationContext<?> context)
Returns localized error message or
null if all of the
encapsulated constraints have no error message. |
getConstraints, getType, validate
public String getMessageTemplate(ValidationContext<?> context)
null
if all of the
encapsulated constraints have no error message.getMessageTemplate
in interface Constraint<V>
getMessageTemplate
in interface Validation<V>
getMessageTemplate
in class AbstractValidation<V>
context
- Validation context.null
if all of the
encapsulated constraints have no error message.public boolean appendMessageArguments(ValidationContext<?> context, Map<String,Object> arguments)
false
.appendMessageArguments
in interface Constraint<V>
appendMessageArguments
in interface Validation<V>
appendMessageArguments
in class ConstraintAggregation<V>
context
- Validation context.arguments
- Arguments to be substituted into error message
template.false
.Copyright © 2011–2020 FoxLabs. All rights reserved.