object Validator
The companion object for Validator provides a number of functions for constructing simple validators.
Validators for comparisons and equality checking can be constructed for types with Order and Eq instances, respectively.
There are also functions provided for constructing validators which always pass and which always fail.
- Alphabetic
- By Inheritance
- Validator
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[F[_], E, A](validate: (A) ⇒ F[E])(implicit arg0: Traverse[F], M: MonoidK[F]): Validator[F, E, A]
Construct a validator by wrapping up a function
A => F[E]. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
eql[F[_], E, A](a: A, e: F[E])(implicit arg0: Traverse[F], arg1: MonoidK[F], arg2: Eq[A]): Validator[F, E, A]
Construct a validator for
Awhich validates that the input is equal to the reference valueaaccording to theEqinstance forA.Construct a validator for
Awhich validates that the input is equal to the reference valueaaccording to theEqinstance forA.If the validation fails the error messages
eare returned. -
def
eql[F[_], E, A](a: A, f: (A) ⇒ F[E])(implicit arg0: Traverse[F], arg1: MonoidK[F], E: Eq[A]): Validator[F, E, A]
Construct a validator for
Awhich validates that the input is equal to the reference valueaaccording to theEqinstance forA.Construct a validator for
Awhich validates that the input is equal to the reference valueaaccording to theEqinstance forA.If the validation fails the function
fis used to construct validation error messages based upon the input. -
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fail[F[_], E, A](e: F[E])(implicit arg0: Traverse[F], M: MonoidK[F]): Validator[F, E, A]
Construct a validator for
Awhich always fails with the given error messages. -
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
gt[F[_], E, A](a: A, e: F[E])(implicit arg0: Traverse[F], arg1: MonoidK[F], arg2: Order[A]): Validator[F, E, A]
Construct a validator for
Awhich validates that the input is greater than the reference valueaaccording to theOrderinstance forA.Construct a validator for
Awhich validates that the input is greater than the reference valueaaccording to theOrderinstance forA.If the validation fails the error messages
eare returned. -
def
gt[F[_], E, A](a: A, f: (A) ⇒ F[E])(implicit arg0: Traverse[F], arg1: MonoidK[F], O: Order[A]): Validator[F, E, A]
Construct a validator for
Awhich validates that the input is greater than the reference valueaaccording to theOrderinstance forA.Construct a validator for
Awhich validates that the input is greater than the reference valueaaccording to theOrderinstance forA.If the validation fails the function
fis used to construct validation error messages based upon the input. -
def
gteq[F[_], E, A](a: A, e: F[E])(implicit arg0: Traverse[F], arg1: MonoidK[F], arg2: Order[A]): Validator[F, E, A]
Construct a validator for
Awhich validates that the input is greater than or equal to the reference valueaaccording to theOrderinstance forA.Construct a validator for
Awhich validates that the input is greater than or equal to the reference valueaaccording to theOrderinstance forA.If the validation fails the error messages
eare returned. -
def
gteq[F[_], E, A](a: A, f: (A) ⇒ F[E])(implicit arg0: Traverse[F], arg1: MonoidK[F], O: Order[A]): Validator[F, E, A]
Construct a validator for
Awhich validates that the input is greater than or equal to the reference valueaaccording to theOrderinstance forA.Construct a validator for
Awhich validates that the input is greater than or equal to the reference valueaaccording to theOrderinstance forA.If the validation fails the function
fis used to construct validation error messages based upon the input. -
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
lt[F[_], E, A](a: A, e: F[E])(implicit arg0: Traverse[F], arg1: MonoidK[F], arg2: Order[A]): Validator[F, E, A]
Construct a validator for
Awhich validates that the input is less than the reference valueaaccording to theOrderinstance forA.Construct a validator for
Awhich validates that the input is less than the reference valueaaccording to theOrderinstance forA.If the validation fails the error messages
eare returned. -
def
lt[F[_], E, A](a: A, f: (A) ⇒ F[E])(implicit arg0: Traverse[F], arg1: MonoidK[F], O: Order[A]): Validator[F, E, A]
Construct a validator for
Awhich validates that the input is less than the reference valueaaccording to theOrderinstance forA.Construct a validator for
Awhich validates that the input is less than the reference valueaaccording to theOrderinstance forA.If the validation fails the function
fis used to construct validation error messages based upon the input. -
def
lteq[F[_], E, A](a: A, e: F[E])(implicit arg0: Traverse[F], arg1: MonoidK[F], arg2: Order[A]): Validator[F, E, A]
Construct a validator for
Awhich validates that the input is less than or equal to the reference valueaaccording to theOrderinstance forA.Construct a validator for
Awhich validates that the input is less than or equal to the reference valueaaccording to theOrderinstance forA.If the validation fails the error messages
eare returned. -
def
lteq[F[_], E, A](a: A, f: (A) ⇒ F[E])(implicit arg0: Traverse[F], arg1: MonoidK[F], O: Order[A]): Validator[F, E, A]
Construct a validator for
Awhich validates that the input is less than or equal to the reference valueaaccording to theOrderinstance forA.Construct a validator for
Awhich validates that the input is less than or equal to the reference valueaaccording to theOrderinstance forA.If the validation fails the function
fis used to construct validation error messages based upon the input. -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
neq[F[_], E, A](a: A, e: F[E])(implicit arg0: Traverse[F], arg1: MonoidK[F], arg2: Eq[A]): Validator[F, E, A]
Construct a validator for
Awhich validates that the input is not equal to the reference valueaaccording to theEqinstance forA.Construct a validator for
Awhich validates that the input is not equal to the reference valueaaccording to theEqinstance forA.If the validation fails the error messages
eare returned. -
def
neq[F[_], E, A](a: A, f: (A) ⇒ F[E])(implicit arg0: Traverse[F], arg1: MonoidK[F], E: Eq[A]): Validator[F, E, A]
Construct a validator for
Awhich validates that the input is not equal to the reference valueaaccording to theEqinstance forA.Construct a validator for
Awhich validates that the input is not equal to the reference valueaaccording to theEqinstance forA.If the validation fails the function
fis used to construct validation error messages based upon the input. -
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
validate[F[_], E, A](implicit arg0: Traverse[F], M: MonoidK[F]): Validator[F, E, A]
Construct a validator for
Awhich always passes.Construct a validator for
Awhich always passes. Usually used as the basis for a more complex validator. -
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )