ValidationError

data class ValidationError(val field: String, val code: String, val message: String, val rejectedValue: Any? = null, val constraint: String? = null, val path: String = field, val messageKey: String = "")

Represents a single constraint violation error resulting from validation evaluation.

Constructors

Link copied to clipboard
constructor(field: String, code: String, message: String, rejectedValue: Any? = null, constraint: String? = null, path: String = field, messageKey: String = "")

Properties

Link copied to clipboard

The unique error code identifier for the failed constraint (e.g. "EMAIL", "NOT_BLANK").

Link copied to clipboard
val constraint: String? = null

The qualified constraint name or annotation descriptor.

Link copied to clipboard

The resolved type-safe ValixErrorCode representation of the error code, if it matches a standard code.

Link copied to clipboard

The simple name of the target property or field that failed validation.

Link copied to clipboard

The human-readable error description message.

Link copied to clipboard

Optional translation key for localized error message resolution.

Link copied to clipboard

The full property navigation path (e.g. "user.address.zipCode" or "items[0].id").

Link copied to clipboard
val rejectedValue: Any? = null

The invalid value that triggered the validation error, or null if unavailable.