Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: How can I use the jqueryvalidation plugin with mdb material?

belu pro asked 7 years ago


Hello,how can I use the https://jqueryvalidation.org/ - for mdb? What are the mdb - classes for errors and valid elements?Thanks a lot in advance,B.L.

belu pro answered 6 years ago


Hi, I am not that good in css and HTML. Is there a chance that you could provide me the styling options for error placement with jqueryvalidation? Regards

Mikołaj Smoleński staff commented 6 years ago

I can provide the styling, but firstly please send me Your zipped project to m.smolenski@mdbootstrap.com

Mikołaj Smoleński staff answered 7 years ago


I guess You should add styles to the error element. For example change it's width and absolute before it's focused and after it. Regards

belu pro answered 7 years ago


Hi, I could find a solution for some parts of the problem... But I have problems with the position and the input color - field, as you can see on the screenshot. What also works, that the input-field becomes green, when it is validated. Do you have an idea, how I could solve the problems described on the screenshot? here my adapted jqueryvalidation - code (just the edited part):
highlight: function(element, errorClass, validClass) {
    $(element).addClass("invalid").removeClass("valid");
    $(element.form).find("label[for=" + element.id + "]")
        .attr("data-error", "Error - Message");
},
unhighlight: function(element, errorClass, validClass) {
    $(element).removeClass("invalid").addClass("valid");
    $(element.form).find("label[for=" + element.id + "]")
        .attr("data-success", "");
}
  https://www.dropbox.com/sh/6o3wkovtyeutt18/AAD5fwbYJAQ7FVdT0k1LS1YNa?dl=0&preview=180110+Screen+Error+Bts+Form.png   Thanks in advance! Regards, Bernhard

Mikołaj Smoleński staff answered 7 years ago


You can simply add jqueryvalidation script to Your page. Unfortunately, there are no MDB classes for errors. You'll need to add Your own classes to work with jqueryvalidation. 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

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: Yes
Tags