How to toggle class when input lenght is not 0 : how to add class when input [type="email"] has lenght > 0 and remove class if input lenght = 0?

Im not so good in javascript. The solution can be in vue.js or pure javascript.

I tried a few examples from the Internet, but without success.

```
<div class="form-group">
  <input type="email" name="email" required>
  <label for="email">Email</label>
</div>
```

- add class if input lenght > 0
- remove class if input lenght = 0