MCPcopy Create free account
hub / github.com/formkit/formkit / removeMessage

Function removeMessage

packages/validation/src/validation.ts:409–417  ·  view source on GitHub ↗

* The messages given to this function have already been set on the node, but * any other validation messages on the node that are not included in this * stack should be removed because they have been resolved. * @param node - The node to operate on. * @param messages - A new stack of messages

(validation: FormKitValidation)

Source from the content-addressed store, hash-verified

407 * @param messages - A new stack of messages
408 */
409function removeMessage(validation: FormKitValidation) {
410 const key = `rule_${validation.name}`
411 if (validation.messageObserver) {
412 validation.messageObserver = validation.messageObserver.kill()
413 }
414 if (has(validation.observer.store, key)) {
415 validation.observer.store.remove(key)
416 }
417}
418
419/**
420 *

Callers 2

rebootFunction · 0.70
nextFunction · 0.70

Calls 1

hasFunction · 0.90

Tested by

no test coverage detected