Initially, let me provide some feedback. It's commendable that you have shared a sandbox, but it is essential that your question includes the necessary code to reproduce the problem. Without it, the question loses its value once the link becomes inactive.
After conducting some debugging to pinpoint the problematic field, I discovered that the error stems from the gender field. Upon closer inspection of the inArray
custom validator, I noticed that it lacks a return statement, leading to the validation failure. Make sure to include return
inside your inArray
function:
const inArray = (value, vm) => {
// don't forget to add return!
return vm.items.some(gender => value.indexOf(gender) !== -1);
};
Furthermore, I recommend utilizing debugging techniques to isolate the issue, which could potentially enable you to resolve it independently :)
Below is the remaining relevant code pertaining to your problem:
<v-select
v-model="user.gender.value"
:items="user.gender.items"
label="Gender"
:solo="true"
:error-messages="userGenderErrors"
append-icon
></v-select>
Snippet from the script:
validations: {
user: {
gender: {
value: {
required,
inArray
}
},
}
},
Access the Updated Sandbox Here