attach Provider
fun <T, S : Any, F : ValidatedField<T>> F.attachProvider(type: Translatable.Provider.Type<S>, provider: Translatable.Provider<T, S>): F
Attach an arbitrary text provider. By default, this does nothing. Different validations can provide implementations to accept various provider types
Return
F the receiver is passed through
Author
fzzyhmstrs
Since
0.7.5
Parameters
F
the subtype of validated field
T
the type that the validated field stores
S
the provider input-output type
type
Translatable.Provider.Type provider type. The validation implementation will use this to determine what it will do with the provider
provider
Translatable.Provider A provider of S. It is supplied the current stored value as well as the S instance that would have been provided. The output is not nullable, if you want to provide nothing custom, pass back the provided original.