fix bug where every valid element after an invalid was marked as invalid

There is a bug where every valid element after an invalid element was marked/styled as invalid due the fact that the `validations` array was global and always included a `false` when a previous element was invalid.
Merge pull request #5738 from christianseel/patch-6

fix bug where every valid element after an invalid was marked as invalid