Package io.spine.validate.option

This package contains the options and the option factories used for message validation.

Types

Link copied to clipboard
public final class Distinct extends FieldValidatingOption<T>
An option that can be applied to repeated and map Protobuf fields to specify that values represented by that field should not contain duplicates.
Link copied to clipboard
public final class DistinctConstraint extends FieldConstraint<V>
A repeated field constraint that requires values to be distinct.
Link copied to clipboard
public abstract class FieldConstraint<V> implements Constraint
A rule that limits a set of values that a Protobuf field can have.
Link copied to clipboard
public abstract class FieldValidatingOption<T> extends FieldOption<F> implements ValidatingOption<T, C, K>
An option that validates a field.
Link copied to clipboard
public final class Goes extends FieldValidatingOption<T> implements Logging
An option that defines field bond to another field within the message.
Link copied to clipboard
public final class GoesConstraint extends FieldConstraint<V>
A constraint which checks whether a field is set only if the specific related field is also set.
Link copied to clipboard
public final class IfInvalid extends FieldOption<F>
An option which provides custom error messages if applied to a field being validated.
Link copied to clipboard
public final class IfMissing extends FieldOption<F>
A field option that defines custom error message if a field is required but missing.
Link copied to clipboard
public class IsRequired implements ValidatingOption<T, C, K>
A oneof validation option which constrains the target oneof group to be set.
Link copied to clipboard
public final class IsRequiredConstraint implements Constraint
A oneof group constraint which signifies that one of the fields must be set.
Link copied to clipboard
public final class MaxConstraint extends RangedConstraint<T>
A constraint, which checks whether a numeric field value exceeds a max value, when applied.
Link copied to clipboard
public final class MinConstraint extends RangedConstraint<T>
A constraint that, when applied to a numeric field, checks whether the value of that field is greater than (or equal to, if specified by the value of the respective option) a min value.
Link copied to clipboard
public final class PatternConstraint extends FieldConstraint<V>
A constraint, which when applied to a string field, checks whether that field matches the specified pattern.
Link copied to clipboard
public final class RangeConstraint extends RangedConstraint<T>
A constraint that checks whether a value fits the ranged described by expressions such as int32 value = 5 [(range) = "[3..5)], describing a value that is at least 3 and less than 5.
Link copied to clipboard
public abstract class RangedConstraint<T> extends FieldConstraint<V>
A constraint that puts a numeric field value into a range.
Link copied to clipboard
public class Required extends FieldValidatingOption<T> implements Logging
An option that makes a field required.
Link copied to clipboard
public final class RequiredConstraint extends FieldConstraint<V>
A constraint that, when applied to a field, checks whether the field is set to a non-default value.
Link copied to clipboard
public final class RequiredField implements ValidatingOption<T, C, K>
A message option that defines a combination of required fields for the message.
Link copied to clipboard
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.
Link copied to clipboard
public final class SetOnce extends FieldOption<F>
An option that indicates that a field value cannot be changed.
Link copied to clipboard
public final class Valid extends FieldValidatingOption<T>
An option that indicates that the message field should be validated according to its constraints.
Link copied to clipboard
public final class ValidateConstraint extends FieldConstraint<V>
A constraint that, when applied to a message field, signifies that the message should have valid properties.
Link copied to clipboard
public interface ValidatingOptionFactory
A factory of validation options for message fields.
Link copied to clipboard
public final class ValidatingOptionsProvider implements OptionsProvider