ValidationData constructor
const
ValidationData({
- required String instanceMemberSymbol,
- required dynamic valueToValidate,
- 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,
});