Integrating with Mithril
This page will help you integrate FormValidation with the Mithril framework.
For the sake of simplicity, we are about to validate a simple login form with just two fields to input the username and password:
It's recommened to put the form inside a component:
Creating a FormValidation instance
The best place to initialize a FormValidation instance is inside the component's oncreate event: