RichErrorSummarySupport

uk.gov.hmrc.hmrcfrontend.views.implicits.RichErrorSummarySupport

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Implicits
object implicits
object Implicits

Members list

Type members

Classlikes

implicit class RichErrorSummary[T](errorSummary: ErrorSummary)(implicit val messages: Messages)

Extension methods to hydrate an ErrorSummary with the errors found in a Play form.

Extension methods to hydrate an ErrorSummary with the errors found in a Play form.

Error messages are hyperlinked to the HTML input elements corresponding to the Play field. For situations where the form field does not correspond to an HTML input element, for example, a composite field such as a date, provide a mapping from the composite field to Play field corresponding to the first HTML input element in the group.

For example:

 @govukErrorSummary(ErrorSummary().withFormErrorsAsText(dateInputForm, mapping = Map("date" -> "date.day")))

Attributes

Supertypes
class Object
trait Matchable
class Any

Implicits

Implicits

final implicit def RichErrorSummary[T](errorSummary: ErrorSummary)(implicit messages: Messages): RichErrorSummary[T]

Extension methods to hydrate an ErrorSummary with the errors found in a Play form.

Extension methods to hydrate an ErrorSummary with the errors found in a Play form.

Error messages are hyperlinked to the HTML input elements corresponding to the Play field. For situations where the form field does not correspond to an HTML input element, for example, a composite field such as a date, provide a mapping from the composite field to Play field corresponding to the first HTML input element in the group.

For example:

 @govukErrorSummary(ErrorSummary().withFormErrorsAsText(dateInputForm, mapping = Map("date" -> "date.day")))

Attributes