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

id

generated by Inspector

severity

used for rendering the ValidationMessage

message

contains the message

details

optional details for extending the message

Constructors

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

Functions

isError
Link copied to clipboard
common
open override fun isError(): Boolean

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(styling: BasicParams.() -> Unit = { }, renderContext: RenderContext, build: AlertComponent.() -> Unit = { })
Convenience extension function to display a ComponentValidationMessage as an alert.
fun ComponentValidationMessage.asAlert(renderContext: RenderContext, build: AlertComponent.() -> Unit = { })
Convenience extension to display a ComponentValidationMessage as an alert.