RequiredFieldConstraint

public final class RequiredFieldConstraint implements Constraint

A constraint that, when applied to a message, checks whether the specified combination of fields has non-default values.

Functions

Link copied to clipboard
public void accept(ConstraintTranslator<? extends Object> visitor)
Accepts the given ConstraintTranslator.
Link copied to clipboard
public ImmutableSet<Alternative> alternatives()
Obtains the set of alternative conjunctive field expressions.
Link copied to clipboard
public String errorMessage(FieldContext field)
Produces an error message for the given field validation context.
Link copied to clipboard
public String optionValue()
Obtains the raw option value.
Link copied to clipboard
public MessageType targetType()
The associated message type.