Zend Framework

Create "Checked" validator for ZFE_Checkbox

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.7.0
  • Fix Version/s: None
  • Component/s: Zend_Validate
  • Labels:
    None

Description

I discussed it with Matthew on IRC, we agreed that there is no clean way to validate that checkbox was checked. For example "required" flag has no meaning for this element, as it always have value due to its implementation in ZF.

Issue is related to ZF-5122.

Activity

Hide
Piotr Czachur added a comment -

Thomas,
it's your turn for the comment.

Show
Piotr Czachur added a comment - Thomas, it's your turn for the comment.
Hide
Thomas Weidner added a comment -

No comment.
But I can't just add a new component.

Each new component needs to have a proposal, and it needs a little bit of time until I finished it.
I added 2 new filter proposals in the last days, but there are still about 5-10 open issues which have to be written as proposal.

As you may imagine, this is a lot of work. So please be patience until I finished all of them.

Note: I am no employee but do this in my sparetime.

Show
Thomas Weidner added a comment - No comment. But I can't just add a new component. Each new component needs to have a proposal, and it needs a little bit of time until I finished it. I added 2 new filter proposals in the last days, but there are still about 5-10 open issues which have to be written as proposal. As you may imagine, this is a lot of work. So please be patience until I finished all of them. Note: I am no employee but do this in my sparetime.
Hide
Bert Van Hauwaert added a comment -

I don't think that there is need for a new validator. It seems to me that the following is a valid solution: http://framework.zend.com/issues/browse/ZF-5325

Checking for required on Zend_Form_Element_Checkbox using notEmpty does not make any sense, in my opinion. "Required" for a checkbox should be defined as the fact that the checkbox was checked; Not that the value is not empty.

Show
Bert Van Hauwaert added a comment - I don't think that there is need for a new validator. It seems to me that the following is a valid solution: http://framework.zend.com/issues/browse/ZF-5325
Checking for required on Zend_Form_Element_Checkbox using notEmpty does not make any sense, in my opinion. "Required" for a checkbox should be defined as the fact that the checkbox was checked; Not that the value is not empty.

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated: