horprogs / Just-validate

Modern, simple, lightweight (~5kb gzip) form validation library written in Typescript, with no dependencies (no JQuery!). Support a wide range of predefined rules, async, files, dates validation, custom error messages and styles, localization. Support writing custom rules and plugins.

Home Page:https://just-validate.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trigger validation and error messages via javascript

AndiLeni opened this issue · comments

Hello,

I want to trigger the validation and displaying of error messages via javascript.
My form is submitted via javscript and hence no submit button is present on my page.
Is it somehow possible to achieve this @horprogs ?
I tried using the validate() function, but this does not display the error messages.

Thanks and kind regards

you have to call revalidate function. If you have registered fields you should see relative error messages.