How can I edit and trigger data-error and data-success?


Topic: How can I edit and trigger data-error and data-success?

.jonathan. pro asked 7 years ago

Hello, So I want to add input validation to my form, and was wondering how can I edit and trigger data-error and data-success? So far I have: <div class="md-form"> <i class="fa fa-envelope prefix"></i> <input type="email" id="inputValidationEx" class="form-control validate"> <label for="inputValidationEx" data-error="wrong" data-success="right">Type your email</label> </div> So first, how can I add code/validation to data-error and data-success like for example if text is too long, is left in blank, etc. And second, how can I trigger it? Some examples would be great. Thanks!

Mikołaj Smoleński staff answered 7 years ago

Hello, We suggest to use jQuery validation plugin, which You can download here: https://jqueryvalidation.org/. Please check out their documentation and tutorials to make it work in Your project. Regards
Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No