0

  <div v-if="!$v.fullname.required" class="error-messages">
                      The full name field is required.
                    </div>

                  
  <div v-if="!$v.fullname.maxLength" class="error-messages">
                      You can enter 30 characters
                      {{ $v.fullname.$params.maxLength.min }} only.
                    </div>
                  

I have two validation errors for one input field, Where for the second validation error message, if the maxlength for input field is exceeding that error message is displaying and now the problem is with first validation error message

By default it's displaying the first validation error message, But i need to display it as, Initially no validation error messages later if user entered some data in input field and then deleted and moved to second field then i have display that first validation error message

validations: {

fullname: { required, minLength: minLength(30), maxLength: maxLength(29) },


}
T dhanunjay
  • 790
  • 1
  • 13
  • 46
  • Any suggestions please? – T dhanunjay Mar 29 '21 at 15:35
  • Refer the answer https://stackoverflow.com/questions/66666895/validate-email-address-having-issue-in-vuejs/66667704#66667704 – Jebasuthan Apr 06 '21 at 02:51
  • @Jebasuthan, Thanks i have referred above question, But only issue with that is initially under the fields all the error messages are displaying, But i need it is, Initially no validations should display, After user enter any character and remove that then only fields should display – T dhanunjay Apr 06 '21 at 07:02
  • checkout the codesandbox demo link https://codesandbox.io/s/dazzling-cloud-2zitd – Jebasuthan Apr 06 '21 at 07:02
  • @Jebasuthan, I have Gone through codesandbox, code, but in my case i need that validations to be checked like, If user typed any character in input field, and delete it then the validations to be checked like" this field is required" Instead of checking in the register button. – T dhanunjay Apr 06 '21 at 13:36

0 Answers0