Add class to inputs that have error #2257

merged 1 commit into from Aug 29, 2012


None yet

3 participants


Although the FormRow helper is very convenient, it was very hard (in fact, impossible) to style input that have errors (mostly because CSS does not have parent selector).

This PR allows to automatically add a class to every input that have errors (the default class being "input-error"). In order to avoid name clashes, this class can be changed in a helper basis, using the function setInputErrorClass.

I don't think it is necessary to allow to remove this class, as it would add another option and complicates the code for nothing..

@weierophinney weierophinney added a commit that referenced this pull request Aug 29, 2012
@weierophinney weierophinney [#2257] Updated README
- Noted changes to formRow()
@weierophinney weierophinney merged commit 4989b79 into zendframework:master Aug 29, 2012

This pull request passes (merged 4989b79 into de807ff).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment