Index

mmo-validity

1 symbol · generated 30 Sep 2026

element

mmo-validity

mmo-validity.jhs:1

Validity element to display a validity of the elements inside the mmo-validity

<mmo-validity readonly></mmo-validity>
Extends
CustomShadowElement
Use the validation API of any element inside the mmo-validity. Any element that has the property `willValidate` and is true, is checked. You MUST implement the following function in the element that is put to the validation: - property `validationMessage`: {string} the validity error message or an empty string. - property `validity`: {ValidityState} - property `willValidate`: {bool} true if the element needs to be validated - function `checkValidity()`: {bool} true if the element is valid

Index

readonlyif true, the validity is set as readonly
readonly accessorGet the readonly of the validity
validity readonly accessorGet the validity of the validity
willValidate readonly accessorGet the will validate of the validity
invalidElements readonly accessorGet the invalid elements of the validity
constructor()
init()
getChangeEvent(node)Get the change event of the element
onElementChange(element, updateMessage)On element change
forceValid()Clear every recorded failure, so the control reads as valid until it is checked again.
update()Update the validity of the element
updateMessage(forceValid)Update the message of the validity
checkValidity()Check the validity of the validity
(default)the controls being validated
.invalidadd a text to the validity

Attributes1

Properties4

readonly

accessormmo-validity.jhs:183

Get the readonly of the validity

get readonly() set readonly(value)
Type
boolean

validity

readonlyaccessormmo-validity.jhs:207

Get the validity of the validity

get validity()
Type
object

willValidate

readonlyaccessormmo-validity.jhs:230

Get the will validate of the validity

get willValidate()
Type
boolean

invalidElements

readonlyaccessormmo-validity.jhs:238

Get the invalid elements of the validity

get invalidElements()
Type
array

Methods8

getChangeEvent(node)

mmo-validity.jhs:52

Get the change event of the element

getChangeEvent(node)
nodeElement- The element
returnsstringThe change event

onElementChange(element, updateMessage)

mmo-validity.jhs:61

On element change

onElementChange(element, updateMessage = true)
elementElement- The element
updateMessage = trueboolean- Whether to update the message

forceValid()

mmo-validity.jhs:93

Clear every recorded failure, so the control reads as valid until it is checked again.

forceValid()
returnsvoid

updateMessage(forceValid)

mmo-validity.jhs:149

Update the message of the validity

updateMessage(forceValid = false)
forceValid = false

checkValidity()

mmo-validity.jhs:222

Check the validity of the validity

checkValidity()
returnsbooleanThe validity

Slots1

CSS hooks1