Validate

@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Validate(val validators: KClass<out Validator<*>>)

Field-anchored validation: whenever this field participates in a mapping — as source (validated BEFORE conversion) or as target (validated AFTER) — its value runs through the validators. Fires at mapping time only; failure is a hard ValidationFailed.

Properties

Link copied to clipboard
val validators: Array<out KClass<out Validator<*>>>