I have a simple login form and i show a message if the user use a wrong password or username
js
onSignin() {
axios.post(
'api/user/signin',
{
email: this.email,
password: this.password,
},
{
headers: { 'X-Requested-With': 'XMLHttpRequest' },
},
).then((response) => {
this.$router.push('dashboard');
}).catch((error) => {
this.errors.add('credentials', 'Wrong user or Password'); //this message i want to move to the dictionary
});
},
html
<form action="POST" >
<span v-show="errors.has('credentials')" class="help is-danger">{{ errors.first('credentials') }}</span>
<p class="form-group">
...
this works, the the error message gets displayed, but how can i add this message to the dictionary, that i have all my messages in one place?