Jump to content

Allow Zero as valid value in required module param


Recommended Posts

Hello,

I'm trying to create a required backoffice module param which allows zero as valid value.

I set up the field like this
 

array(
'col' => 2,
'type' => 'text',
'name' => 'PARAM_NAME',
'label' => $this->l('my label'),
'desc' => $this->l('my desc'),
'suffix' => $this->l('sfx'),
'required' => true,
),

And when I type in 0 and save I get an error message that fill in all required fields.

I could set required to false, but this data is required by an API and if not set it can cause all sorts of problems.

How can I allow zero as valid value?

oh I forgot. I'm using PS 1.7.6.1

Edited by PisziBp (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...