I'm using the leaveStep event to trigger some validations in the steps.
Img of the code:

If there's an error it triggers the the setOptions:

But when I fill the field and click next it doesn't remove the error state on the previous step:

I'm using the smartwizard version 5.1.1
Many thanks