guillaumepotier / Parsley.js

Validate your forms, frontend, without writing a single line of javascript

Home Page:http://parsleyjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parsley.js bug

bartollajos opened this issue · comments

Hello,

Could you help please in the following parsley.js issue?

It seems to be a Parsley bug: Parsley should remove the error container if there are no errors anymore.

https://stackoverflow.com/questions/65236237/parsley-validation-after-a-successful-input-validation-an-empty-element-is-rema

@marcandre Do you have any idea? There is a screenshot under the stackoverflow link above which explains the issue.

Thank you,
Lui

@marcandre Thank you for answer on stackoverflow.
I would need a jquery script which will remove the .parsley-errors-list when the input is succeeded.
It seems otherwise it is remined there. Although i used .filled class in CSS.

https://stackoverflow.com/questions/65236237/parsley-validation-after-a-successful-input-validation-an-empty-element-is-rema

@marcandre it seems this script does the trick. Maybe it is ugly but works:

$('#contactForm').parsley().on('field:success', function() { 
    $('ul.parsley-errors-list').not(':has(li)').remove();
});