I am using Kohana 3.2 on a project that I am working on. I am new to this framework.
While searching for the documentation for validation I found this page :
http://kohanaframework.org/3.1/guide/kohana/security/validation
In that page they are using built in helper functions for generating the form. I followed that tutorial but I was surprised to see even after using the form helper functions I had to to loop through the errors array and display the errors one by one. This is very much unlike Yii which displays the error messages automatically next to the form fields and also applies basic javascript validation intelligently.
Hence my question what is the point of using the form helper functions in Kohana framework ? Or is there some other purpose I am missing out ?
It’s completely optional, they’re there just to ‘easen’ form elements creation, so that you don’t have to escape each attributes HTML chars manually etc. You can add a function to display errors like
echo Form::errors($errors, 'field_name')if you want.You’ll learn that Kohana doesn’t do anything ‘magical’ by itself, it’s all up to the developer to decide. IMO that’s a strength.