I had experience creating custom validation in Zend Framework 2 (using version 2.0.5 currently). I am interested in creating a password section for changing the "edit profile" form. What I want to have has 3 fields:
- Current Password,
- New Password,
- Confirm the new password.
Then I want to check the following:
- If a new password is set, the current password must also be set (and authenticated), and the new password must match the new password.
- If the current password is set, you must also enter a new password and confirm the new password.
- If none of them are installed, enable editing the rest of the profile to continue checking.
I think that you can get the gist of what I need, Iβm looking for a reusable way to do this using Zend Framework 2. Ideally, creating a special validator so that forms can be reused, it was believed that I suspect a factory might be better . Nothing, so I donβt need to check it at the controller / service level and repeat myself wherever I want to use this.
Respectfully,
ISE
source share