Hello,
I'd appreciate a simple PHP validator example to just make clear what the module expects to see. I am trying to validate against blank field have tried the following guess snippets and none is working:
$value != ''
and
if (!$value) return false;
and
if ($value == '') form_set_error();
Thanks,
KT
Comments
Comment #1
TapocoL commentedWell, I created a validator like this to check if a field has any value in it:
return !empty($value);
It seemed to work fine. However when you are applying a field that will be validated using that validator, "Allow this field to be empty?" MUST NOT be checked, or else your validator will never fail.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.