Quasar: q-select and required break validation with no errors when using Vuelidate

Created on 30 Mar 2017  路  1Comment  路  Source: quasarframework/quasar

Doing something like below where the "required" is entered in the element fully breaks validation and gives no error about issue. I know this is not mentioned as an option in the docs, but many people are used to include it.

Solution is to ONLY use required in the validations, never on element.

          <q-select
            type="list"
            class="full-width"
            label="Treats"
            v-model="newVisit.treat"
            :options="treatOptions"
            :class="{'has-error': $v.newVisit.treat.$error}"
            required 
          ></q-select>

Great work on this framework!

Software version

Quasar: 0.5.2
OS: OSX latest
Node: 6.10
NPM:
Browsers:
iOS:
Android:
Any other software related to your bug:

What did you get as the error?

What were you expecting?

What steps did you take, to get the error?

Most helpful comment

Hi,

Thank you for your kind words. Stay tuned for next release (v0.14) ;)

As long as there are good libraries out there like Vuelidate, Quasar will never handle validations with its own engine because it would only mean reinventing the wheel. So, in this case, please fully adhere to Vuelidate's way of validating forms, which means importing the required rule and assigning it to the model.

Cheers,
Razvan

>All comments

Hi,

Thank you for your kind words. Stay tuned for next release (v0.14) ;)

As long as there are good libraries out there like Vuelidate, Quasar will never handle validations with its own engine because it would only mean reinventing the wheel. So, in this case, please fully adhere to Vuelidate's way of validating forms, which means importing the required rule and assigning it to the model.

Cheers,
Razvan

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tombarfoot picture tombarfoot  路  3Comments

danikane picture danikane  路  3Comments

wc-matteo picture wc-matteo  路  3Comments

alexeigs picture alexeigs  路  3Comments

jean-moldovan picture jean-moldovan  路  3Comments