Adds 'validated' class when the input is validated

This class is not removed until the input next fails validation, unlike the 'success' class which is only visible while the element has focus.