Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parsley.js - Displaying Errors in a Specified Element

Using Parsley.js, is it possible to specify the element that should hold the error messages? I tried:

$('#myForm').parsley({
    errors: {
        container: {
            $('#errorMessages')
        }
    }
});

But the error messages are still placed right after my form inputs.

like image 796
Alix Axel Avatar asked Jan 30 '13 12:01

Alix Axel


1 Answers

I've added another data-attribute, data-parsley-errors-container="#element". That could allow you modify the DOM to specify where the error messages will be displayed.

More info here: http://parsleyjs.org/doc/index.html#ui-for-field

Best

like image 139
guillaumepotier Avatar answered Sep 21 '22 13:09

guillaumepotier