How to set error message fetched from server in form field with ant design vue 3?

Viewed 271

As the question is, I need to set error message retrieved from the backend (laravel) and set it on every field if there is an error. The structure may look like this:

{
  'errors': {
     'email' : ['The Email field is required'],
     'password' : ['The Password field is required'] 
  }
}

In vuetify, I just set in the prop error-messages in one of the form input component (error-messages=data.errors.email then it picked up automatically the first one). The question is, how to do like this in ant-design-vue 3 ? Couldn't find any. I tried this but I don't want to use createForm since I already use form from inertia. Also tried this too but I barely to understand that. Now I'm stuck, I'm hoping someone could help me, thanks :(.

0 Answers
Related