I am using the Field validation module to validate a text field using the Length rule with a minimum length of 1.


When the field is left empty, no validation error is shown.


Setting the field as required is not the solution for this specific case, as it causes problems with a module I am using.

How can I avoid users don't enter a value for that field?

  • Ticking field as required is not the solution for this specific question. Could you expand on why? If you require the field to be at least one character, by definition it's a required field isn't it?
    – Clive
    Commented Aug 17, 2021 at 15:33
  • @Clive It's for Commerce and it's sub modules, and one of the sub modules Commerce Product Options has Required setting bugged and doesn't work. I got Select List fields already working with Field Validation and now need to make it work with Text field. But ran some test on fresh install and looks like Length rule doesn't even work on regular content type Text fields. Commented Aug 17, 2021 at 15:38

1 Answer 1


I resolved the issue using the Clientside validation module, which has a sub-module that adds client side validation support for the Field Validation module.

  • The Clientside Validation module doesn't change how the Field Validation module works. It just uses AJAX to validate form elements. I tested both the modules on simplytest.me, but the issue described on the question hasn't been resolved.
    – apaderno
    Commented Aug 18, 2021 at 13:24
  • I can't reproduce then what resolved it. Commented Aug 18, 2021 at 16:02

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.