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) },


}

5
  • Any suggestions please? Commented Mar 29, 2021 at 15:35
  • Refer the answer stackoverflow.com/questions/66666895/… Commented Apr 6, 2021 at 2: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 Commented Apr 6, 2021 at 7:02
  • checkout the codesandbox demo link codesandbox.io/s/dazzling-cloud-2zitd Commented Apr 6, 2021 at 7: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. Commented Apr 6, 2021 at 13:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.