ValidationData constructor

const ValidationData({
  1. required String instanceMemberSymbol,
  2. required dynamic valueToValidate,
  3. required List<ValidatorAnnotation> annotations,
})

Creates an instance of ValidationData.

The valueToValidate is the value that needs to be validated, and annotations is a list of validator annotations associated with the value.

Example:

var data = ValidationData(
  valueToValidate: "Hello, World!",
  decorators: [StringLengthValidator(minLength: 5, maxLength: 20)],
);

Implementation

const ValidationData({
  required this.instanceMemberSymbol,
  required this.valueToValidate,
  required this.annotations,
});