interface PropertyValidator<T : Any>
(source)
A validator associated with a specific configuration property.
open static fun <T : Any> allInList(validator: PropertyValidator<in T>): PropertyValidator<MutableList<T>>
A validator that applies a validator to all elements of list, if the list is present. |
|
open static fun anyOf(vararg values: String): PropertyValidator<String> open static fun anyOf(values: MutableCollection<String>): PropertyValidator<String>
A validator that ensures a property, if present, has a value within a given set. open static fun anyOf(values: MutableCollection<String>, comparator: Comparator<String>): PropertyValidator<String>
A validator that ensures a property, if present, has a comparable value within a given set. |
|
open static fun anyOfIgnoreCase(vararg values: String): PropertyValidator<String> open static fun anyOfIgnoreCase(values: MutableCollection<String>): PropertyValidator<String>
A validator that ensures a property, if present, has a value within a given set. |
|
open static fun <T : Any> combine(first: PropertyValidator<in T>, second: PropertyValidator<in T>): PropertyValidator<T> open static fun <T : Any> combine(validators: MutableList<PropertyValidator<in T>>): PropertyValidator<T>
Returns a single validator that combines the results of several validators. |
|
open static fun inRange(from: Long, to: Long): PropertyValidator<Number>
A validator that ensures a property, if present, is within a long integer range. |
|
open static fun isPresent(): PropertyValidator<Any>
A validator that ensures a property is present. |
|
open static fun isURL(): PropertyValidator<String>
A validator that ensures a property, if present, is a well-formed URL. |
|
abstract fun validate(key: String, position: DocumentPosition?, value: T?): MutableList<ConfigurationError>
Validate a configuration property. |