In This Article

BarcodeValidationResult Class

Represents the result of barcode value validation.

public class BarcodeValidationResult
Inheritance:
object object

Properties

ErrorMessage

An error or warning message related to the validation result, or null if the validation succeeded without issues.

public string? ErrorMessage { get; init; }

Property Value

string

IsValid

Indicates whether the validation succeeded.

public bool IsValid { get; }

Property Value

bool:

true if validation succeeded; otherwise, false.

Severity

A BarcodeValidationSeverity that indicates the severity level of the validation result.

public BarcodeValidationSeverity Severity { get; init; }

Property Value

BarcodeValidationSeverity

Value

The value to encode.

public string? Value { get; init; }

Property Value

string

Methods

Error(string?, string)

Creates a failed validation result with the specified error message.

public static BarcodeValidationResult Error(string? value, string errorMessage)
Parameter Type Description
value string

The value to encode.

errorMessage string

The error message.

Returns

BarcodeValidationResult:

A BarcodeValidationResult indicating failure.

Success(string)

Creates a successful validation result.

public static BarcodeValidationResult Success(string value)
Parameter Type Description
value string

The value to encode.

Returns

BarcodeValidationResult:

A BarcodeValidationResult indicating success.

Warning(string, string)

Creates a successful validation result with the specified warning message.

public static BarcodeValidationResult Warning(string value, string errorMessage)
Parameter Type Description
value string

The value to encode.

errorMessage string

The warning message.

Returns

BarcodeValidationResult:

A BarcodeValidationResult indicating a warning.

Inherited Members

Extension Methods