AddError Success version

when adding the addError to a field that shows a very nice form feedback. Is there an equivalent as in addSuccess?

I would like to give positive feedback to the user too when they filled in a form correctly. Not just the green color, but also some text , like like the addError, but then on success

Any ideas ?


The key point on success and error messages are handled by toggling the CSS class "has-error" in yii2.

You can do it manually by jQuery. The following links may help u

Bootstrap reference


I think when I can set the text of the helpblock in the controller rule validation section I am fine.

I can only use the addError to set the text of the helpblock div

Any ideas how I can set the text of the helpblock on a non-error. the actual text needs to come from the custom controller rule validation function