externalContextOrNull
protected fun <TContext> externalContextOrNull(externalContextName: String? = null): PropertyDelegateProvider<Validation<T>, ReadOnlyProperty<ValidationContext, TContext?>>(source)
Function used to declare a dependency to an external context and delegate access to its value within a ValidationContext.
If the external context could not be found during the execution of the validation, then accessing this external context will return null.
It should be used as follows:
private val ValidationContext.externalContextName: Type? by externalContextOrNull()Content copied to clipboard