FYI On a bug fix in Form.php
There was a buggy line in
$this->hasErrors = empty($errors);
This would set hasErrors to be True if $errors were empty, which is the opposite logic we want.
The line should actually read:
$this->hasErrors = !empty($errors);
If you're using Form.php you should update it with the latest version to fix this bug.
Hat tip to Barbara for spotting this!