constraint

object constraint
class Object
trait Matchable
class Any

Type members

Classlikes

trait LowerCase

Constraint: checks if the input value is lower case.

Constraint: checks if the input value is lower case.

trait Match[V]

Constraint: checks if the input value matches V.

Constraint: checks if the input value matches V.

Type Params
V

the regex to match with.

trait UpperCase

Constraint: checks if the input value is upper case.

Constraint: checks if the input value is upper case.

Types

type Alphanumeric = DescribedAs[Match["^[a-zA-Z0-9]+"], "Value should be alphanumeric"]
type URLLike = DescribedAs[Match["^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&\'\\(\\)\\*\\+,;=.]+$"], "Value should be an URL"]
type UUIDLike = DescribedAs[Match["^([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12})"], "Value should be an UUID"]

Givens

Givens

given given_RuntimeOnly_String_LowerCase: RuntimeOnly[String, LowerCase]
inline given given_RuntimeOnly_String_Match[V <: String]: RuntimeOnly[String, Match[V]]
given given_RuntimeOnly_String_UpperCase: RuntimeOnly[String, UpperCase]