Packages

  • package root
    Definition Classes
    root
  • package com
    Definition Classes
    root
  • package wix
    Definition Classes
    com
  • package accord

    The entry-point to the Accord library.

    The entry-point to the Accord library.

    Overview

    An Accord validator is a typeclass, which adds data validation rules over an existing domain model. The api module deals with the usage site; details on how to define validators can be found in the core module.

    To use a validator, simply import this package, make sure the validator is in scope and use the validate function:

    scala> import com.wix.accord._
    import com.wix.accord._
    
    scala> import MyDomain._
    import MyDomain._
    
    scala> val person = Person( name = "Niklaus", surname = "Wirth", age = 81 )
    person: MyDomain.Person = Person(Niklaus,Wirth,81)
    
    scala> validate( person )
    res0: com.wix.accord.Result = Success

    See Result, Success and Failure for details of the result model.

    Definition Classes
    wix
  • object Implicits

    Provides alternative syntax for validation.

    Provides alternative syntax for validation. Instead of having to explicitly call com.wix.accord.validate, an object can be validated by calling instanceUnderTest.validate. This is strictly an aesthetic preference, there are no differences in implementation or execution.

    Definition Classes
    accord
    Annotations
    @deprecated
    Deprecated

    (Since version 0.7) Will be removed in subsequent releases; you can reimplement this easily if needed.

  • ExtendObjectForValidation
c

com.wix.accord.Implicits

ExtendObjectForValidation

implicit class ExtendObjectForValidation[T] extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ExtendObjectForValidation
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ExtendObjectForValidation(x: T)(implicit arg0: Validator[T])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. def validate: Result

    Executes the validation rule for this instance.

    Executes the validation rule for this instance.

    returns

    A com.wix.accord.Result indicating whether or not validation was successful.

  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped