Showing content from https://www.playframework.com/documentation/2.5.x/api/scala/play/api/data/Mapping.html below:
Mapping - play.api.data.Mapping
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 addPrefix(prefix: String): Option[String]
def applyConstraints(t: T): Either[Seq[FormError], T]
final def asInstanceOf[T0]: T0
def clone(): AnyRef
-
Attributes
-
protected[java.lang]
-
Definition Classes
-
AnyRef
-
Annotations
-
@throws( ... )
def collectErrors(t: T): Seq[FormError]
final def eq(arg0: AnyRef): Boolean
-
Definition Classes
-
AnyRef
def equals(arg0: Any): Boolean
-
Definition Classes
-
AnyRef â Any
def finalize(): Unit
-
Attributes
-
protected[java.lang]
-
Definition Classes
-
AnyRef
-
Annotations
-
@throws( classOf[java.lang.Throwable] )
val format: Option[(String, Seq[Any])]
The Format expected for this field, if it exists.
final def getClass(): Class[_]
-
Definition Classes
-
AnyRef â Any
def hashCode(): Int
-
Definition Classes
-
AnyRef â Any
final def isInstanceOf[T0]: Boolean
final def ne(arg0: AnyRef): Boolean
-
Definition Classes
-
AnyRef
final def notify(): Unit
-
Definition Classes
-
AnyRef
final def notifyAll(): Unit
-
Definition Classes
-
AnyRef
final def synchronized[T0](arg0: â T0): T0
-
Definition Classes
-
AnyRef
def toString(): String
-
Definition Classes
-
AnyRef â Any
def transform[B](f1: (T) â B, f2: (B) â T): Mapping[B]
Transform this Mapping[T] to a Mapping[B].
Transform this Mapping[T] to a Mapping[B].
-
B
-
The type of the new mapping.
-
f1
-
Transform value of T to a value of B
-
f2
-
Transform value of B to a value of T
def verifying(error: â String, constraint: (T) â Boolean): Mapping[T]
Constructs a new Mapping based on this one, by adding a new ad-hoc constraint.
Constructs a new Mapping based on this one, by adding a new ad-hoc constraint.
For example:
import play.api.data._
import validation.Constraints._
Form("phonenumber" -> text.verifying("Bad phone number", {_.grouped(2).size == 5}))
-
error
-
The error message used if the constraint fails
-
constraint
-
a function describing the constraint that returns false
on failure
-
returns
-
the new mapping
def verifying(constraint: (T) â Boolean): Mapping[T]
Constructs a new Mapping based on this one, by adding a new ad-hoc constraint.
Constructs a new Mapping based on this one, by adding a new ad-hoc constraint.
For example:
import play.api.data._
import validation.Constraints._
Form("phonenumber" -> text.verifying {_.grouped(2).size == 5})
-
constraint
-
a function describing the constraint that returns false
on failure
-
returns
-
the new mapping
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
-
@throws( ... )
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4