@webhare/formsapi-parsleyjs
v1.0.1
Published
Allows you to use the WebHare forms API with Parsleyjs
Downloads
1
Keywords
Readme
WebHare Formsapi/parsleyjs integration
This module integrates parsley to replace standard validation in the WebHare formsapi
Usage
Install the module
whcd <project>/webdesigns/webdesign
npm i @webhare/formsapi-parsleyjs
Use the module
import * as dompack from 'dompack';
import ParsleyForm from '@webhare/formsapi-parsleyjs'
dompack.register('form.wh-form', form => new ParsleyForm(form));
Replacing forms/parsley
If your code was currently importing from @mod-publisher/js/forms/parsley
you can replace it
by importing this module, updating the library name (see above) and removing the jQuery parameter
from your call to new ParsleyForm