Search code examples
javascripthtmlreactjsmaterializeformvalidation.io

Can I use formvalidation.io with React and Materialize-css


Is it possible to use formvalidation.io plugin along with React and Materialize-css.

My project has multiple input components which may or may not be used inside a form. I would like to use formvalidation plugin for validation of input component.

Not able to find any documentation related to this. Is this possible? If possible please someone share me references related to this.

Updates:

  1. I found there this documentation in form validation plugin website, where its clearly mentioned that how to use form validation in React. But not able to find any detailed documentation related to this.
  2. This is how right now I tried to import jQuery and formvalidation plugin into my project, but when I am loading formvalidation getting error saying, formvalidation require jquery.
import $ from "jquery/dist/jquery.min.js";
window.jQuery = $;
window.$ = $;
import M from "materialize-css/dist/js/materialize.min.js";
window.M = M;
import "formvalidation/dist/js/formValidation.min.js"

Thanks for all feedback.


Solution

  • Finally found some documentation related to this with help of Formvalidation.io team.

    This documentation explains how to use form-validation in materialize css : Reference - Using formvalidation with materialize css

    This documentation give information about how to use formvalidation in React : Reference - Using formvalidation with react