add errors from Form class

Add the possibility to display errors from new Form class.
Is the `elseif` on new line because of new coding standard?