mmo-validity
1 symbole · générée le 27 Oct 2026
mmo-validity
mmo-validity.jhs:1Validity element to display a validity of the elements inside the mmo-validity
- Étend
- CustomShadowElement
Index
| readonly | if true, the validity is set as readonly | |
| firstInvalidElement readonly accessor | The first control that fails, in the order of the page. | |
| readonly accessor | Get the readonly of the validity | |
| validity readonly accessor | Get the validity of the validity | |
| willValidate readonly accessor | Get the will validate of the validity | |
| invalidElements readonly accessor | Get the invalid elements of the validity | |
| constructor() | ||
| init() | ||
| whenPointerFree(fn) | Run a function once the pointer is released and its click delivered. | |
| onFocusOut(event) | The focus left a control: the user is done with it, its message can show. | |
| reportValidity() | Show the messages of the controls that fail, from now on. | |
| refresh() | Check every control again, without a word: a value set by a binding fires no input event, the state of its control was still the one it had when it was drawn. | |
| getChangeEvent(node) | Get the change event of the element | |
| onElementChange(element, updateMessage) | On element change | |
| recordValidity(element) | Record which checks a control fails. | |
| 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 | |
| .invalid | add a text to the validity |
Attributs1
readonly
mmo-validity.jhsif true, the validity is set as readonly
readonly
Propriétés5
firstInvalidElement
readonlyaccessormmo-validity.jhs:123The first control that fails, in the order of the page.
- Type
?Element
readonly
accessormmo-validity.jhs:284Get the readonly of the validity
- Type
boolean
validity
readonlyaccessormmo-validity.jhs:308Get the validity of the validity
- Type
object
willValidate
readonlyaccessormmo-validity.jhs:332Get the will validate of the validity
- Type
boolean
invalidElements
readonlyaccessormmo-validity.jhs:340Get the invalid elements of the validity
- Type
array
Méthodes13
constructor()
mmo-validity.jhs:28init()
mmo-validity.jhs:49whenPointerFree(fn)
mmo-validity.jhs:72Run a function once the pointer is released and its click delivered. The focus leaves a field on the *press* of the next one: a message shown there moved that field before the release, and the click ended on whatever had come under the pointer.
| fn | function | |
| retourne | void |
onFocusOut(event)
mmo-validity.jhs:90The focus left a control: the user is done with it, its message can show.
| event | FocusEvent | |
| retourne | void |
reportValidity()
mmo-validity.jhs:103Show the messages of the controls that fail, from now on.
| retourne | boolean | true when every control is valid |
refresh()
mmo-validity.jhs:115Check every control again, without a word: a value set by a binding fires no input event, the state of its control was still the one it had when it was drawn.
| retourne | void |
getChangeEvent(node)
mmo-validity.jhs:132Get the change event of the element
| node | Element | - The element |
| retourne | string | The change event |
onElementChange(element, updateMessage)
mmo-validity.jhs:141On element change
| element | Element | - The element |
| updateMessage = true | boolean | - Whether to update the message |
recordValidity(element)
mmo-validity.jhs:160Record which checks a control fails.
| element | Element | |
| retourne | void |
forceValid()
mmo-validity.jhs:187Clear every recorded failure, so the control reads as valid until it is checked again.
| retourne | void |
update()
mmo-validity.jhs:203Update the validity of the element
updateMessage(forceValid)
mmo-validity.jhs:243Update the message of the validity
| forceValid = false |
checkValidity()
mmo-validity.jhs:323Check the validity of the validity
| retourne | boolean | The validity |
Slots1
(default)
mmo-validity.jhsthe controls being validated
<slot>
Points d'accroche CSS1
.invalid
mmo-validity.jhsadd a text to the validity
.invalid