object Validator extends ValidatorMacros

Linear Supertypes
ValidatorMacros, AnyRef, scala.Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Validator
  2. ValidatorMacros
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class All[T](validators: Seq[Validator[T]]) extends Validator[T] with Product with Serializable
  2. case class Any[T](validators: Seq[Validator[T]]) extends Validator[T] with Product with Serializable
  3. case class Custom[T](doValidate: (T) => List[ValidationError[_]], showMessage: Option[String] = None) extends Validator[T] with Product with Serializable
  4. type EncodeToRaw[T] = (T) => Option[scala.Any]
  5. case class Enumeration[T](possibleValues: List[T], encode: Option[EncodeToRaw[T]], name: Option[SName]) extends Primitive[T] with Product with Serializable
  6. case class Mapped[TT, T](wrapped: Validator[T], g: (TT) => T) extends Validator[TT] with Product with Serializable
  7. case class Max[T](value: T, exclusive: Boolean)(implicit valueIsNumeric: Numeric[T]) extends Primitive[T] with Product with Serializable
  8. case class MaxLength[T <: String](value: Int) extends Primitive[T] with Product with Serializable
  9. case class MaxSize[T, C[_] <: Iterable[_]](value: Int) extends Primitive[C[T]] with Product with Serializable
  10. case class Min[T](value: T, exclusive: Boolean)(implicit valueIsNumeric: Numeric[T]) extends Primitive[T] with Product with Serializable
  11. case class MinLength[T <: String](value: Int) extends Primitive[T] with Product with Serializable
  12. case class MinSize[T, C[_] <: Iterable[_]](value: Int) extends Primitive[C[T]] with Product with Serializable
  13. case class Pattern[T <: String](value: String) extends Primitive[T] with Product with Serializable
  14. sealed trait Primitive[T] extends Validator[T]

Value Members

  1. final def !=(arg0: scala.Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: scala.Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def all[T](v: Validator[T]*): Validator[T]
  5. def any[T](v: Validator[T]*): Validator[T]
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. def custom[T](doValidate: (T) => List[ValidationError[_]], showMessage: Option[String] = None): Validator[T]

    Create a custom validator

    Create a custom validator

    doValidate

    Validation function

    showMessage

    Custom message

  9. macro def derivedEnumeration[T]: Enumeration[T]

    Creates an enum validator where all subtypes of the sealed hierarchy T are objects.

    Creates an enum validator where all subtypes of the sealed hierarchy T are objects. This enumeration will only be used for documentation, as a value outside of the allowed values will not be decoded in the first place (the decoder has no other option than to fail).

    Definition Classes
    ValidatorMacros
  10. def enumeration[T](possibleValues: List[T], encode: EncodeToRaw[T], name: Option[SName] = None): Enumeration[T]

    Create an enumeration validator, with the given possible values, an optional encoding function (so that the enumerated values can be represented in documentation), and an optional name (to create a reusable documentation component).

    Create an enumeration validator, with the given possible values, an optional encoding function (so that the enumerated values can be represented in documentation), and an optional name (to create a reusable documentation component).

    encode

    Specify how values of this type can be encoded to a raw value, which will be used for documentation.

  11. def enumeration[T](possibleValues: List[T]): Enumeration[T]

    Create an enumeration validator, with the given possible values.

    Create an enumeration validator, with the given possible values.

    To represent the enumerated values in documentation, an encoding function needs to be provided. This can be done: * by using the overloaded enumeration method with an encode parameter * by adding an encode function on an Validator.Enumeration instance using one of the .encode functions * by adding the validator directly to a codec (see Mapping.addEncodeToEnumValidator * when the values possible values are of a basic type (numbers, strings), the encode function is inferred if not present, when being added to the schema, see Schema.validate

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. def fixedLength[T <: String](value: Int): Validator[T]
  15. def fixedSize[T, C[_] <: Iterable[_]](value: Int): Validator[C[T]]
  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def inRange[T](min: T, max: T, minExclusive: Boolean = false, maxExclusive: Boolean = false)(implicit arg0: Numeric[T]): Validator[T]
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. def max[T](value: T, exclusive: Boolean = false)(implicit arg0: Numeric[T]): Primitive[T]
  21. def maxLength[T <: String](value: Int): Primitive[T]
  22. def maxSize[T, C[_] <: Iterable[_]](value: Int): Primitive[C[T]]
  23. def min[T](value: T, exclusive: Boolean = false)(implicit arg0: Numeric[T]): Primitive[T]
  24. def minLength[T <: String](value: Int): Primitive[T]
  25. def minSize[T, C[_] <: Iterable[_]](value: Int): Primitive[C[T]]
  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. def negative[T](implicit arg0: Numeric[T]): Primitive[T]
  28. def nonEmpty[T, C[_] <: Iterable[_]]: Primitive[C[T]]
  29. def nonEmptyString[T <: String]: Primitive[T]
  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  32. def pass[T]: Validator[T]

    A validator instance that always pass.

  33. def pattern[T <: String](value: String): Primitive[T]
  34. def positive[T](implicit arg0: Numeric[T]): Primitive[T]
  35. def positiveOrZero[T](implicit arg0: Numeric[T]): Primitive[T]
  36. def reject[T]: Validator[T]

    A validator instance that always reject.

  37. def show[T](v: Validator[T]): Option[String]
  38. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  39. def toString(): String
    Definition Classes
    AnyRef → Any
  40. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  41. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from ValidatorMacros

Inherited from AnyRef

Inherited from scala.Any

Ungrouped