* 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)
| 407 | * @param messages - A new stack of messages |
| 408 | */ |
| 409 | function 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 | * |