Just-validate icon indicating copy to clipboard operation
Just-validate copied to clipboard

Custom Validator rule is not executed upon revalidateField()

Open NaLogo opened this issue 1 year ago • 1 comments

Describe the bug When using a custom validator rule, the validator is not executed when calling revalidateField() on the field that was changed.

Here's an example: Codesandbox.io

In this example, I set the validator so that it always resolves to false. Then I attached a keyup event to the field which calls revalidateField() on that field. But no errors show up. Only when the user attempts to submit the form the validator will be executed and show the error message.

To Reproduce Steps to reproduce the behavior:

  1. Attach custom validator rule to field
  2. Call revalidateField() on that field
  3. Nothing happens

Expected behavior The custom validator rule is executed and errors show up if it resolves to false.

NaLogo avatar Jan 09 '25 14:01 NaLogo

Is this introduced with the latest release?

wmtbuddhika avatar Sep 19 '25 11:09 wmtbuddhika