1// I want the fields of my form to be required (using Vuetify built-in validation).
2// Some of them are numbers and Vuetify doesn't like when I input 0 (because 0 == false).
3// The solution is to evaluate a string inside of the 'required' method.
4
5// Instead of writing this :
6
7rules: {
8 required: v => !!v || 'Field is required',
9}
10// (If v is NOT not false (!!v), return true, else return 'Field is required')
11
12// Just write this :
13
14rules: {
15 required: v => !!`${v}` || 'Field is required'
16}