Closed richard-jones closed 3 years ago
My bad, this was a very oblique bug in a custom validator that was causing a reset
on the parsley field under certain circumstances, and giving the impression that the UI was not updated. In fact the UI was updated and reset all so quickly that you couldn't tell. Sorry for the noise!
What kind of issue is this? (put 'x' between the square brackets)
[ ] Question. This issue tracker is not the place for questions. If you want to ask how to do something, or to understand why something isn't working the way you expect it to, use http://stackoverflow.com/questions/ask . Provide working code, starting from http://codepen.io/marcandre/pen/jqbzyN?editors=101. We monitor the tag
parsley.js
.[x] Bug report. If you’ve found a bug, you must provide a minimal example in a CodePen, starting from http://codepen.io/marcandre/pen/jqbzyN?editors=101 .
[ ] Feature Request. Make sure there's no good way to do what you want first; consider asking on http://stackoverflow.com/questions/ask first.
I am making the following call
(where
this.form
is a reference to a jQuery element for the form).On
fail
a message is shown to the user saying that they cannot submit. As I am usingwhenValidate
, I am also expecting the UI to update to highlight the invalid field, and provide validation error messages.What actually happens when I run this is that the message is shown to the user as expected, but the UI is not updated with the parsley errors.
On the parsley object, there is a property
validationResult
and it has the valuefalse
. I looked in thefields
property of the parsley object, and I could not see any invalid fields:(where
parsley
is the result of callingthis.form.parsley()
above, and then runningwhenValidate
)I wonder if this lack of invalid fields is the reason the UI has not been updated. What I can't work out is how I can get a validation failure, but have no invalid fields. I do have invalid fields, and I'm trying to get them to be highlighted.