-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access form/field errors within a custom input #57
Comments
Coming Soon@quimarche Good question, the short answer, is that there isn't a great way to do this at this precise moment, but Current StateThat said, it is possible today, just not super "pretty". <template>
<FormulateForm
ref="form"
@input="checkValidation"
>
... inputs here ...
<FormulateInput
:disabled="hasErrors"
type="submit"
/>
</FormulateForm>
</template>
<script>
export default {
data () {
hasErrors: false
},
methods: {
async checkValidation () {
// Even better if you debounce this a bit
this.hasErrors = await this.$refs.form.hasValidationErrors()
}
}
}
</script> Let me know if you have other issues with this. |
How would this be done more cleanly in 2.3+ ? |
@fidelix we pushed the features related to this (originally planned for 2.3/2.4) down the road a bit. |
Wonder if it is still developing? |
I'm trying to enable/disable submit buttons depending on the validation status of other fields in the form. How might I do this? i.e. which property or chain of properties can I access to determine the validation status?
The text was updated successfully, but these errors were encountered: