You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using VFJS with Vuetify and I would like to pass vfjsFieldErrors as the error-messages prop to Vuetify's VTextField component.
As far as I know, I could create a wrapper component for the uiSchema and map vfjsFieldErrors to error-messages prop; however what I was thinking is since setting errorHandler as true on a component already gets the error messages as an array and passes them as children, could it be possible to add an option to pass down the errors as a prop to the component instead?
I was thinking something like this:
{component: 'v-text-field',model: key,fieldOptions: {
...
},errorOptions: {class: ['is-invalid'],// If this key is found transform the errors the same was as if `errorHandler: true`errorAsProp: 'error-messages'// Optionally a mapper can be defined that would receive `ajv` errors array and you can// transform them however you wanterrorMapper: (errors)=> ...
},}
Maybe I'm missing something and there's an easier way to accomplish this?
The text was updated successfully, but these errors were encountered:
I'm using VFJS with Vuetify and I would like to pass
vfjsFieldErrors
as theerror-messages
prop to Vuetify'sVTextField
component.As far as I know, I could create a wrapper component for the
uiSchema
and mapvfjsFieldErrors
toerror-messages
prop; however what I was thinking is since settingerrorHandler
astrue
on a component already gets the error messages as an array and passes them aschildren
, could it be possible to add an option to pass down the errors as a prop to the component instead?I was thinking something like this:
Maybe I'm missing something and there's an easier way to accomplish this?
The text was updated successfully, but these errors were encountered: