0

I added a form to my site and a field which needs validation, this is the field:

    <input class="newsletterInput validate-length maximum-length-20 minimum-length-3"
           name="first_name"
           type="text"
           placeholder=""
           id="nl2go_first_name"
           style="width: 100%;"
           value="<?php echo $this->getFirstname() ?>">

But there is no error message if the validation fails.

How can I show the fail message e.g. "you need to enter at least 3 chars and max 20 chars"?

  • I already solved it, but the admin deleted my answer for unknown reasons. However, it already works, it just showed the validation message on the wrong place and I did not noticed it. – Black Feb 3 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.