You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to listen for an error in the second field.
I have an issue it will not be added a class to the button. Is it technically possible to do this?
A button is pushed on the second element under an error but an error is under input cell. So, I try to add a new class to the button when an error arise for the second element. I have used if (input.dataset.parsleyId === '13')
`
$(document).ready(function()
{
var parsleyConfig = {
errorsContainer: function(parsleyField) {
return $('#errors');
}
};
$("form").parsley(parsleyConfig);
if (input.dataset.parsleyId === '13') {
button.setAttribute("class", "fixed-margin-button1");
}
$("form").on('submit', function(e)
{
var f = $(this);
f.parsley().validate();
if (f.parsley().isValid()) {
alert('The form is valid');
} else {
alert('There are validation errors');
}
e.preventDefault();
}
);
}
);
`
The text was updated successfully, but these errors were encountered:
I try to listen for an error in the second field.
I have an issue it will not be added a class to the button. Is it technically possible to do this?
A button is pushed on the second element under an error but an error is under input cell. So, I try to add a new class to the button when an error arise for the second element. I have used if (input.dataset.parsleyId === '13')
`
$(document).ready(function()
{
var parsleyConfig = {
errorsContainer: function(parsleyField) {
return $('#errors');
}
};
$("form").parsley(parsleyConfig);
if (input.dataset.parsleyId === '13') {
button.setAttribute("class", "fixed-margin-button1");
}
$("form").on('submit', function(e)
{
var f = $(this);
f.parsley().validate();
}
);
}
);
`
The text was updated successfully, but these errors were encountered: