Best approach to display login form errors



  • Hi. Very new to both Vue and Quasar and have made great progress.

    I was wondering how to go about displaying an error message on a login form after the user has submitted but then the server says the password is incorrect.

    I added an errorMessage property bound to a div on the form template and set it when the server returns the error message (which works) but I was wondering if there is a more elegant solution?

    I did try a computed rules bind which works except of course the validation runs before the server returns the error. I could not find a way to “throw” an error on either the form or (say) the password field after the submission and have it trigger the validation in order to get the nice message showing up. I am probably missing something obvious here.

    Thanks,
    Murray



  • Ahhh… I was looking in the wrong place. Looking at the QInput docs now. Sorry.


Log in to reply