Validators

Checks used by generated loaders for the validation annotations. Each returns an error message, or null when the value is valid.

Functions

Link copied to clipboard
fun notBlank(value: String): String?

Checks @NotBlank.

Link copied to clipboard
fun pattern(value: String, regex: String): String?

Checks @Pattern: the whole value must match regex.

Link copied to clipboard
fun range(value: Double, min: Double, max: Double): String?

Checks @Range: value must be a number within min..max.

Link copied to clipboard
fun size(size: Int, min: Int, max: Int): String?

Checks @Size: size must be within min..max.