Q-Form and validation state



  • I’m porting some old code written in Element-UI to Quasar, I noticed that in q-form there’s no @validate emit event called everytime a check is made.

    I don’t want to use any external validator (like vuelidate or veevalidate), so I’m thinking an easy way to check the form status, the goal is to enable/disable some feature in the page without pressing the “validate” button.

    I tried with @change on qform to call .validate() but this method triggers every components validation.
    I know that I can check for every @blur, but I prefer something cleaner.

    Any clue?



  • It’s currently a guess on my part, but QForm has @validation-success and @validation-error. I’m thinking you could use those to get your overall logic working?

    Scott



  • I already saw @validation-success and error, but they are triggered only after a validate(), so it’s the same.
    I know that some of this logic is similar to $anydirty/$anyerror provided by vuelidate, but I think we can do this also with quasar without external addon


Log in to reply