开发者

Howto see if form fields are identical in Zend framework [duplicate]

This question already has answers here: Zend_Form: how to check 2 fields are identical (4 answers) Closed 8 years ago.

In Zend Framework (1.10) i want to check if two input fields are identical I have the following code in my form:

$this->addElement('password', 'password', array(
        'label'      => 'Wachtwoord:',
        'required'   => true
    )
);

$this->addElement('password', 'verifypassword', array(
        'label'      => 'Bevestig wachtwoord:',
        'required'   => true,
    )
);
开发者_如何学Python

I already tryed the "identical" validator, but I did'nt got it to work.


You can use a custom validation filter to accomplish this.

http://framework.zend.com/manual/en/zend.form.elements.html

The documentation outlines what you are describing, under Note: Validation Operates On Filtered Values with a class called My_Validate_PasswordConfirmation

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜