Home > Software design >  Vue : Vue Formulate input custom error message
Vue : Vue Formulate input custom error message

Time:02-15

I using Vue Formulate for form validation. When submit the error message show Formid is required., but I want Form ID is required

  <FormulateForm
    
    v-model="formValues"
    @submit="submitHandler"
  >
    <FormulateInput
      name="formid"
      type="text"
      label="Form ID"
      placeholder=""
      validation="required"

    />
    <FormulateInput
      type="submit"
      label="Log In"
    />
  </FormulateForm>

CodePudding user response:

Use custom validation message link , validation-name props to replace default name

  <FormulateForm
    
    v-model="formValues"
    @submit="submitHandler"
  >
    <FormulateInput
      name="formid"
      type="text"
      label="Form ID"
      placeholder=""
      validation="required"
      validation-name="Form ID"
    />
    <FormulateInput
      type="submit"
      label="Log In"
    />
  </FormulateForm>
  • Related