DateInputExpectation

io.github.frikit.twirlspec.expect.DateInputExpectation
See theDateInputExpectation companion object
final case class DateInputExpectation(name: String, legend: Option[Expected] = ..., hint: Option[Expected] = ..., parts: List[String] = ...) extends Expectation

The GOV.UK date input: three fields under one legend.

Attributes

Companion
object
Source
FormExpectations.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Expectation
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def check(page: Page): Seq[Violation]

Empty means satisfied.

Empty means satisfied.

Attributes

Source
FormExpectations.scala
def description: String

Human description, used when listing what a page was checked against.

Human description, used when listing what a page was checked against.

Attributes

Source
FormExpectations.scala
def hinted(key: String, args: Any*): DateInputExpectation

The hint under the legend, from a message key, and that the fieldset announces it.

The hint under the legend, from a message key, and that the fieldset announces it.

Attributes

Source
FormExpectations.scala
def legendIs(key: String, args: Any*): DateInputExpectation

The legend above the three fields, from a message key.

The legend above the three fields, from a message key.

Attributes

Source
FormExpectations.scala
def withParts(p: String*): DateInputExpectation

The parts to expect, day, month and year by default.

The parts to expect, day, month and year by default.

Attributes

Source
FormExpectations.scala

Inherited methods

def and(other: Expectation): Expectation

Both this expectation and another, as one.

Both this expectation and another, as one.

Attributes

Inherited from:
Expectation
Source
Expectation.scala

Downgrade every violation this expectation produces to a warning.

Downgrade every violation this expectation produces to a warning.

Attributes

Inherited from:
Expectation
Source
Expectation.scala
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def when(p: Page => Boolean): Expectation

Only apply this expectation when the page satisfies a predicate.

Only apply this expectation when the page satisfies a predicate.

Attributes

Inherited from:
Expectation
Source
Expectation.scala