ComponentValidationMessage

data class ComponentValidationMessage(id: String, severity: Severity, message: String, details: String?) : ValidationMessage

Special ValidationMessage for fritz2 components.

Important: id should be generated by using the inspect function in your Validator. By default the validation fails if one or more ComponentValidationMessages have a severity of Severity.Error. You can override the isError method to change this behavior.

Parameters

details

optional details for extending the message

id

generated by Inspector

message

contains the message

severity

used for rendering the ValidationMessage

Constructors

ComponentValidationMessage
Link copied to clipboard
common
fun ComponentValidationMessage(id: String, severity: Severity, message: String, details: String? = null)
generated by Inspector

Functions

component1
Link copied to clipboard
common
operator fun component1(): String
component2
Link copied to clipboard
common
operator fun component2(): Severity
component3
Link copied to clipboard
common
operator fun component3(): String
component4
Link copied to clipboard
common
operator fun component4(): String?
copy
Link copied to clipboard
common
fun copy(id: String, severity: Severity, message: String, details: String? = null): ComponentValidationMessage
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
isError
Link copied to clipboard
common
open override fun isError(): Boolean
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

details
Link copied to clipboard
common
val details: String? = null
optional details for extending the message
id
Link copied to clipboard
common
val id: String
generated by Inspector
message
Link copied to clipboard
common
val message: String
contains the message
severity
Link copied to clipboard
common
val severity: Severity
used for rendering the ValidationMessage

Extensions

asAlert
Link copied to clipboard
js
fun ComponentValidationMessage.asAlert(renderContext: RenderContext, size: FormSizes.() -> Style<BasicParams> = { normal }, stacking: AlertStacking.() -> Style<BasicParams> = { separated })
Convenience extension to display a ComponentValidationMessage as an alert.