Score:0

Validation doesn't show an error when the value entered in the field doesn't respect the minimum length

us flag

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

screenshot

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

screenshot

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?

cn flag
_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?
user3108268 avatar
us flag
@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.
Score:0
us flag

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.

apaderno avatar
us flag
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.
user3108268 avatar
us flag
I can't reproduce then what resolved it.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.